| Deutsch English Français Italiano |
|
<ad944a408b1460ef22e783f395bce1b9@www.novabbs.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail From: mitchalsup@aol.com (MitchAlsup1) Newsgroups: comp.arch Subject: Re: Stealing a Great Idea from the 6600 Date: Thu, 20 Jun 2024 02:44:21 +0000 Organization: Rocksolid Light Message-ID: <ad944a408b1460ef22e783f395bce1b9@www.novabbs.org> References: <lge02j554ucc6h81n5q2ej0ue2icnnp7i5@4ax.com> <v02eij$6d5b$1@dont-email.me> <152f8504112a37d8434c663e99cb36c5@www.novabbs.org> <v04tpb$pqus$1@dont-email.me> <v4f5de$2bfca$1@dont-email.me> <jwvzfrobxll.fsf-monnier+comp.arch@gnu.org> <v4f97o$2bu2l$1@dont-email.me> <613b9cb1a19b6439266f520e94e2046b@www.novabbs.org> <v4hsjk$2vk6n$1@dont-email.me> <6b5691e5e41d28d6cb48ff6257555cd4@www.novabbs.org> <oQLcO.1452$F34e.952@fx44.iad> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: i2pn2.org; logging-data="554491"; mail-complaints-to="usenet@i2pn2.org"; posting-account="7opjq6o0gOhusEORo6KGlWDqrGdcQlz3IQ8pYKMWkuY"; User-Agent: Rocksolid Light X-Spam-Checker-Version: SpamAssassin 4.0.0 X-Rslight-Site: $2y$10$0C6tWLGUxW8CCP3UvlwUbuOdmCasF4vE0a4Nl0UsUHRycZhSGZiAW X-Rslight-Posting-User: ac58ceb75ea22753186dae54d967fed894c3dce8 Bytes: 2733 Lines: 39 EricP wrote: > MitchAlsup1 wrote: >> >> One of the things we found in Mc 88120 was that the compiler should >> NEVER >> be allowed to put unnecessary instructions in decode-execute slots that >> were unused--and that almost invariable--the best code for the GBOoO >> machine was almost invariably the one with the fewest instructions, and >> if several sequences had equally few instructions, it basically did not >> matter. >> >> For example:: >> >> for( i = 0; i < max, i++ ) >> a[i] = b[i]; >> >> was invariably faster than:: >> >> for( ap = &a[0], bp = & b[0];, i = 0; i < max; i++ ) >> *ap++ = *bp++; >> >> because the later has 3 ADDs in the loop wile the former has but 1. >> Because of this, I altered my programming style and almost never end up >> using ++ or -- anymore. By the way:: The statement about Always applies to Mc 881x0's and a few other RISC architectures with indexed address modes. > The 88000 had a scaled-indexed address mode on LD and ST. > Alpha didn't but had a scaled-indexed S8ADDQ (aka LEA) instruction. > ISA's that didn't used individual shifts and adds (like real RISC's > do!) > so for them an optimizing compiler converting to the ++ form is > optimal, > and might be folded into an auto-increment address mode. No disagreement when other architectures made different choices getting to where they got.