Indexing vs pointers
Walter Bright
bright at Data-IO.COM
Sat May 7 06:50:11 AEST 1988
In article <1272 at wjvax.UUCP> miker at wjvax.UUCP (Michael Ryan) writes:
<if , for instance, you have a struct of , say , 60 bytes or so, like this:
< struct foo { char name [32]; long value; int asst[ 5 ]; } dave[200];
<accessing dave with indexes becomes harrowing if your compiler is not smart
<I currently use , much to my chagrin, Msoft 5.0. an index like dave[3]
<becomes
<
< mov ax, 02EH ; or there about..
< imul 3 ;
<no, the Msoft 5.0 optimizer does nothing to change multiple array index
<accesses into pointer accesses. why ? I do not know.
<can anyone name an MS-DOS product that does ?
Datalight's optimizer does. I know because I wrote it.
"We keep you alive to serve this net. Post well,... and live."
More information about the Comp.lang.c
mailing list