1 |
> I've been there, done that and bought the t-shirt... Well... maybe I just |
2 |
> looked at the t-shirt.... |
3 |
> |
4 |
> Anyway, I tried Os, O2 and O3 on a number of different packages on a gentoo |
5 |
> box running on an AMD XP2500 clocked to 2.5ghz. My test results were at best |
6 |
> ambigeous and didn't reflect what the main stream purporters of "BIG |
7 |
> PERFORMANCE GAINS" with magical compiler settings. At first I thought I was |
8 |
> onto something, but then, like yourself figured out that it was mostly "smoke |
9 |
> and mirrors". Compiler options are best used to optimized specific |
10 |
> applications. Over all use, across an entire linux installation... no one |
11 |
> option is better than the other. That's been my observation, shoot me if you |
12 |
> wish. :') |
13 |
|
14 |
Heck no. You're right, of course, and if you want best performance |
15 |
there's a metric arseoads of things to consider, not least of all the |
16 |
processor, motherboard, memory model, speed, latency settings, size of |
17 |
cache lines, cache algorithms -- and perhaps more importantly the |
18 |
number of running threads. All this is rarely worth the bother, |
19 |
especially the uninformed bother (read: just abuot everyone's |
20 |
fiddling, including mine). I don't prentend to know particularly much, |
21 |
it's just that these days there's so little difference I figured I |
22 |
might as well try to save your cache from unnecessary use - with 80 |
23 |
processes being something of a minimum, ideally in cache, as that what |
24 |
it's for - and if the code runs no slower, at worst (and probably |
25 |
quite commonly) there's no gain. So I use it, for both my systems. |
26 |
|
27 |
I'm just wondering whether Os does better on average on modern cpu's |
28 |
all else being the same, because of the shifts of importance of moving |
29 |
data, and with bigger caches avoiding loading code from memory all the |
30 |
time. Considering the amount of threads on a system these days. |
31 |
There's a small parallel with swapping here. Uh, yeah, that, hrm, slow |
32 |
medium, 'main memory'. Okay, maybe not so much:) |
33 |
|
34 |
So really, I'm just looking for the largest affector and spamming this |
35 |
list with my fiddling, heh. |
36 |
|
37 |
> I just run |
38 |
> |
39 |
> CHOST="i686-pc-linux-gnu" |
40 |
> CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe" |
41 |
> CXXFLAGS="${CFLAGS}" |
42 |
> |
43 |
> in /etc/make.conf and forget about the optimization madness... |
44 |
Same here. Except I'm having fun with -Os right now. Oh, and -ftracer |
45 |
because a friend sugegsted that in the same line of reasoning, simpler |
46 |
code is better. But yeah. |
47 |
|
48 |
> Besides, most of the ebuilds specify their own optimization settings |
49 |
> anyways... |
50 |
|
51 |
I know. Often because if they don't things break, or it makes |
52 |
supporting harder. Joy:) |
53 |
|
54 |
--Bart Alewijnse |
55 |
|
56 |
-- |
57 |
gentoo-performance@g.o mailing list |