Messages in this thread | | | Date | Thu, 06 Feb 2003 14:58:21 -0800 | From | "Martin J. Bligh" <> | Subject | Re: gcc -O2 vs gcc -Os performance |
| |
>> 2901299 vmlinux.O2 >> 2667827 vmlinux.Os > > Well, Os is certainly smaller.
Yup. I have lots of RAM though, so unless I can see the perf increase from cache effects, it's not desperately interesting to me personally. If someone could do similar measurements with a puny-cache celeron chip, it would be interesting ...
> So I suspect -Os tends to be more appropriate for user-mode code, and > especially code with low repeat rates. Possibly the "low repeat rate" > thing ends up being true of certain kernel subsystems too.
Fair enough. I'm not desperately interested in user-land code at the moment, personally, but gcc is admittedly more general. Maybe we should compile gcc itself with -Os ;-) Andi (I think) also made the observation that the garbage-collect size for gcc3.2 may be rather small.
The observation re low repeat rate is interesting ... might be amusing to do some really basic profile-guided optimisation on this grounds, take readprofile / oprofile output, and compile the files that don't get hammered at all with -Os rather than -O2. Given their low frequency (by definition), I'm not sure that improving their icache footprint will have a measureable effect though.
M.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |