> I've been there, done that and bought the t-shirt... Well... maybe I just
> looked at the t-shirt....
> Anyway, I tried Os, O2 and O3 on a number of different packages on a gentoo
> box running on an AMD XP2500 clocked to 2.5ghz. My test results were at best
> ambigeous and didn't reflect what the main stream purporters of "BIG
> PERFORMANCE GAINS" with magical compiler settings. At first I thought I was
> onto something, but then, like yourself figured out that it was mostly "smoke
> and mirrors". Compiler options are best used to optimized specific
> applications. Over all use, across an entire linux installation... no one
> option is better than the other. That's been my observation, shoot me if you
> wish. :')
Heck no. You're right, of course, and if you want best performance
there's a metric arseoads of things to consider, not least of all the
processor, motherboard, memory model, speed, latency settings, size of
cache lines, cache algorithms -- and perhaps more importantly the
number of running threads. All this is rarely worth the bother,
especially the uninformed bother (read: just abuot everyone's
fiddling, including mine). I don't prentend to know particularly much,
it's just that these days there's so little difference I figured I
might as well try to save your cache from unnecessary use - with 80
processes being something of a minimum, ideally in cache, as that what
it's for - and if the code runs no slower, at worst (and probably
quite commonly) there's no gain. So I use it, for both my systems.
I'm just wondering whether Os does better on average on modern cpu's
all else being the same, because of the shifts of importance of moving
data, and with bigger caches avoiding loading code from memory all the
time. Considering the amount of threads on a system these days.
There's a small parallel with swapping here. Uh, yeah, that, hrm, slow
medium, 'main memory'. Okay, maybe not so much:)
So really, I'm just looking for the largest affector and spamming this
list with my fiddling, heh.
> I just run
> CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
> in /etc/make.conf and forget about the optimization madness...
Same here. Except I'm having fun with -Os right now. Oh, and -ftracer
because a friend sugegsted that in the same line of reasoning, simpler
code is better. But yeah.
> Besides, most of the ebuilds specify their own optimization settings
I know. Often because if they don't things break, or it makes
supporting harder. Joy:)
firstname.lastname@example.org mailing list