Marcelo H Majczak wrote:
>> Pentium M is a P3 ?
>>
> 
> Well it may be that -fast gets it wrong...
> 
> $ CC -fast -dryrun
> ###     command line files and options (expanded):
> ### -xO5 -xarch=sse2 -xcache=32/64/8:2048/64/8 -xchip=pentium3 -xdepend=yes 
> -fsimple=2 -fns=yes -ftrap=%none -xlibmil -xlibmopt -xbuiltin=%all -nofstore 
> -xregs=frameptr -Qoption CC -iropt -Qoption CC -xcallee64 -dryrun 
> ### CC: Note: NLSPATH = 
> /opt/SUNWspro/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/SUNWspro/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
> 
> $ CC -V
> CC: Sun C++ 5.9 SunOS_i386 Patch 124864-01 2007/07/25
> 
> $ psrinfo -pv
> The physical processor has 1 virtual processor (0)
>   x86 (GenuineIntel 6D8 family 6 model 13 step 8 clock 600 MHz)
>         Intel(r) Pentium(r) M processor 1.50GHz
> 
> Which I checked just in case and yes it is a pentium 4. This is running on 
> notebook, IBM X41.
> 
>>> Now an honest question, what is the impact of under specing the cache?
>> Less chances of cache thrashing for CPU's with a smaller L2.
>>
> 
> Ok, I understand that. So, if I build to run an a specific machine then it is 
> ok to take the full cache into consideration.

Oh, yes. If you're only building for your own boxes, then, by all means, 
optimize away. :-)

You may run the risk of running into over-optimisations which break the code, 
though, especially with -xO5. I have also seen -xO5 yield worse performance 
than 
-xO3.

The advantage of having a fixed known set of optimisation flags is that they've 
been tested and known to work. The moment these change, they might no longer 
work, or they might appear to work, when in fact there are subtle malfunctions.

--Stefan

-- 
Stefan Teleman
Sun Microsystems, Inc.
Stefan.Teleman at Sun.COM


Reply via email to