[Lemon-devel] Optimization flags

Alpár Jüttner alpar at cs.elte.hu
Mon Jan 22 20:13:08 CET 2007


Hi,

I've made some comparison on the effect of gcc optimization flags. The
test code is a graph algorithm implemented using LEMON (of course),
compiled with gcc-4.1, the cpu is Intel T2500 (Core Duo).
Here come the sizes of the executables, the compilation times and the
running times of the algorithm with different optimization flags.
There is no surprise in this table. I just post it to emphasize: *always
use optimization!!!*

Regards,
Alpar

option
exec. size
comp. time
running time
-O0 (default)
216K
1.8s
7m22s
-Os
116K
2.7s
2m43s
-O1
64K
2.8s
35.5s
-O2
64K
3.3s
27.7s
-O3
56K
3.4s
26.7s
-O3 -ggdb
561K
3.9s
26.8s





More information about the Lemon-devel mailing list