Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!limes From: limes@sun.uucp (Greg Limes) Newsgroups: comp.lang.c Subject: Re: Indexing vs pointers Message-ID: <51371@sun.uucp> Date: 29 Apr 88 18:52:08 GMT References: <1988Apr8.183815.3187@utzoo.uucp> <449@goofy.megatest.UUCP> <2200@louie.udel.EDU> <587@vsi.UUCP> <629@clinet.FI> Reply-To: limes@sun.UUCP (Greg Limes) Organization: Sun Microsystems, Mountain View Lines: 11 In article <629@clinet.FI> msa@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@+,a1@+"; 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@sun.com] frames to /dev/fb