Indexing vs pointers

Greg Limes limes at sun.uucp
Sat Apr 30 04:52:08 AEST 1988


In article <629 at clinet.FI> msa at clinet.UUCP (Markku Savela) writes:
>	The question is of course: is there really any penalty in
>using indexed versions with other architectures (like motorola)?

Yes, the motorola archetecture does take a hit here. With the pointer
version, the data transfer is done using "movb a0 at +,a1 at +"; with the
index version, "movb a0@(0,d1:l),a1@(0,d1:l)" and "addql #1,d1".
Calculation of transfer times gets hairy, but a quick test shows that
the pointer version is about 25% faster.
-- 
   Greg Limes [limes at sun.com]				frames to /dev/fb



More information about the Comp.lang.c mailing list