On Mon, 18 Oct 1999 12:16:32 +0100, Mathew Hendry wrote:

>> From: Richard A. Smith [mailto:[EMAIL PROTECTED]]
>> 
>> Perhaps we should examine the compiler assembly output of the 2 test
>> cases.

>/* "array" version */
>L19:
>       addl (%ecx,%edx,4),%eax
>       subl $1,%edx
>       jnc L19
>L17:
>       ret

>/* "pointer" version */
>L25:
>       addl $-4,%ecx
>       addl (%ecx),%eax
>       subl $1,%edx
>       jnc L25
>L23:
>       ret

Well there's the answer.  The pointer version has an extra addl
instruction.  Does this hold true for an array of floats as well?  (I
would check myself but I don't have gcc here at work)


--
Richard A. Smith                         Bitworks, Inc.               
[EMAIL PROTECTED]               501.521.3908                        
Sr. Design Engineer        http://www.bitworks.com   


--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to