Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!vector!gryphon!sarima From: sarima@gryphon.CTS.COM (Stan Friesen) Newsgroups: comp.lang.c Subject: Re: Array indexing vs. pointers... Message-ID: <7918@gryphon.CTS.COM> Date: 20 Oct 88 01:08:19 GMT References: <225800077@uxe.cso.uiuc.edu> Reply-To: sarima@gryphon.CTS.COM (Stan Friesen) Organization: Trailing Edge Technology, Redondo Beach, CA Lines: 17 In article <225800077@uxe.cso.uiuc.edu> mcdonald@uxe.cso.uiuc.edu writes: > > Then understand the hardware and instruction set of the >target computer (portable? what's that? We have already decided to go >go the gold medal). Look at the compiler's .asm output. Try changing >things like x*65 to x<<6+x. It might be faster, might not. Well, as far as I can tell, the Portable C Compiler does this for you, at least with -O set. I have seen the equivalent of the above in so many places in the system that I cannot imagine it being in the source code. In fact I have seen it in once-executed start-up code, which very few programmers would bother tweaking to this level. -- Sarima Cardolandion sarima@gryphon.CTS.COM aka Stanley Friesen rutgers!marque!gryphon!sarima Sherman Oaks, CA