[Freeciv-Dev] gcc optimization (-02 vs -O3)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hi,
I'm curious about why Freeciv is compiled with gcc optimizations -O2 only
as default. My current guess is that it's there as a conservative measure
for stability.
Description of -O3 from gcc manual:
-O3 Optimize yet more. -O3 turns on all optimizations
specified by -O2 and also turns on the -finline-func
tions, -fweb, -funit-at-a-time, -ftracer,
-funswitch-loops and -frename-registers options.
I tested some autogames with -O3, and got about 20% increase
in performance. The improvement from register renaming will be
even more on architectures that can take advantage of it,
such as P4.
My testing didn't uncover any problems related to stability.
I'm not saying that you should jump to -O3 right away, there might be good
reasons for sticking to -O2 that I haven't considered. But at least
consider it, if -O3 turns out to be reliable after more thorough testing.
Andreas Røsdal
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] gcc optimization (-02 vs -O3),
Andreas Røsdal <=
|
|