On Friday 25 July 2003 17:10, Stefano Marinelli wrote:
> Alle 05:30, venerdì 25 luglio 2003, Jason Stubbs ha scritto:
> > -pipe -fomit-frame-pointer -mfpmath=sse". I was using -O3 but read
> > that it can be slower than -O2 on systems that don't have a large CPU
> > cache. I believe that the cache on my system is only 64K and so tried
>
> slower in compiling or the resulting program?

slower in compiling AND the resulting program. -O3 only adds 
-fomit-frame-pointer and -finline-functions to -O2's set of optimizations. 
-finline-functions will try to inline all functions based on the resulting 
code size of each function. On machine's with small CPU cache this can cause 
a dramatic cache penalty when a block of code is larger than the cache size. 
Compiling is a little slower too as the compiler needs to figure out what it 
should try inlining and what it shouldn't.

What I read said that a machine with a "small cache"... But what is a small 
cache? I've read that Athlon XP has a 64k internal cache and I believe 
Pentiums (not Celerons) have a 512kb internal cache. So, 64k sounds pretty 
small to me! ;-) You'll have to check whether Athlon MP is the same or not.

Actually, I'm not certain if there's much difference in the RUNNING speed of 
the applications on my system, but the LOADING times are much faster. 
However, this could just be due to smaller executables and a slow (? ~40MB/s 
cached) hard drive. Nor have I done any strict testing.

Jason


--
[EMAIL PROTECTED] mailing list

Reply via email to