Array indexing vs. pointers...

Stan Friesen sarima at gryphon.CTS.COM
Thu Oct 20 11:08:19 AEST 1988


In article <225800077 at uxe.cso.uiuc.edu> mcdonald at 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 at gryphon.CTS.COM
aka Stanley Friesen			rutgers!marque!gryphon!sarima
					Sherman Oaks, CA



More information about the Comp.lang.c mailing list