Skip to contentSkip to conversation

add a config option for -Os compilation

PATCH Matt 1 participant 1 message Oct 18, 2003

lore
Share & tools
lore

Matt

author
#0 lore raw
Quoted 3 lines

The main effect of -Os compared to -O2 (besides disabling some reordering of the code and prefetching) is the disabling of various alignments. I doubt that's a win on all CPUs.

Well the big win I found from -Os is the disabling of code inlining. So I found I got much better code from -finline-limit=100. I found this value after trial and error (via a bit of bench marking). Mind you this is what works for my athlon.. Mind you the difference isnt that huge.. I found turning on -Winline and -finline-limit handy for finding the culprits of huge inlines..

matt