Hey Florin,

On Sun, 2003-08-17 at 21:37, Florin Andrei wrote:
> Did anyone see any signifficant difference between -O2 and -O3 on
> processors with small caches (like the AthlonXP - 256KB)?

I didn't test much, I generally use standard settings. However, I've
played with -O2 vs. -O3 from time to time. And to my surprise, -O2 is
generally faster!

My thoughts are as follows: -O3 is said to enable -finline-functions,
which inlines functions into their callers. Of course, this increases
binary size significantly. As you've said, your CPU only has a small
L1/L2 cache, which means that netto, less *runtime* code fits in these
caches. Memory-to-L1/L2-cache data moving is fairly expensive compared
to direct L1/L2 cache. And not inlining functions only causes one call
instrction extra, so it's not that negative to *not* inline functions,
especially if they're called in various places and/or are not small.

HTH,

Ronald

-- 
Ronald Bultje <[EMAIL PROTECTED]>



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to