On Sat, 16 Oct 1999 22:54:32 +0100, Mathew Hendry wrote:

>With gcc, using array notation is usually faster (particularly, I found,
>when the dataset exceeds the level 2 cache size - couldn't figure out
>why...)

I don't know a whole lot about x86 assembly and the pentium arch but
perhaps there is some sort of relative addressing going on vs pointer
work where the pointers requie an extra load instruction over just
haveing a register set to the base address of the array with an
offset.

This would seem to make sense with cache misses sinde the penalty for
the extra load would be more if the aceess to memory was outside the
cache.

Perhaps we should examine the compiler assembly output of the 2 test
cases.

On another note  My latest Linux Journal has an article about
performance of programs based on compilers.  pgcc appears to help
with speed. Anyone tried to get lame to compile under pgcc?
--
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