On Dec 21, 2007 9:57 AM, Marcelo H Majczak <horacek_ at yahoo.com> wrote:
> >
> > I find it interesting that Sun Studio is the only compiler I've ever
> > used that has you specify cache size values. gcc, MS Visual Studio,
> > and even Intel's compiler have never had me do that to get good
> > performance. In fact, I don't know that I can with them.
> >
>
> Allow me to answer this...
>
> See http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html . There are 
> options to set the cache size on gcc, and like Sun's compiler you don't have 
> to use them.

I wasn't even aware those existed. I have never used them, nor have I
ever seen open source software that uses them over many, many years of
using GNU/Linux systems (since 1995/1996).

Of course, it appears that the options to control cache size were just
added in 2007, so this is not surprising.

I personally believe that specifying them for software you ship is a
bad idea(tm) unless you are targeting a very specific platform. There
are too many revisions of processors anymore, and the cache size can
vary greatly even among the same processor family. Intel has already
started doing this for the Core 2 Duo, which can come with as little
as 128kb L2 cache or as much as megabytes depending on which version
you buy.

> My original question was why that value and not any other. The answer was to 
> prevent cache trashing on lower spec systems. That makes sense if you package 
> software for distribution, you target a minimum acceptable hardware.
>
> I'm not shipping mine, thus I can use higher specs. Simple as that.

I agree it's fine if you're tuning for a specific target.

-- 
Shawn Walker, Software and Systems Analyst
http://binarycrusader.blogspot.com/

"To err is human -- and to blame it on a computer is even more so." -
Robert Orben

Reply via email to