gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] some comments on -fm2-whole-program


From: Gaius Mulley
Subject: [Gm2] some comments on -fm2-whole-program
Date: Sun, 17 Aug 2014 13:44:47 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)



Hi,

I thought it might be interesting to post some preliminary results with
the -fm2-whole-program option.  I've compiled the gm2/example/map
program with "-O3 -fm2-whole-program" alternatively with "-O3".  In this
application (a maze generation program) which uses arrays heavily the
-fm2-whole-program almost doubles the speed of the final executable with
only about 7% increase size of code on the x86_64 platform.

time ./map-whole-program > t2

real    0m1.515s
user    0m1.500s
sys     0m0.000s

time ./a.out > t1

real    0m2.836s
user    0m2.824s
sys     0m0.004s

size a.out 
   text    data     bss     dec     hex filename
 164522     920  492016  657458   a0832 a.out

size map-whole-program 
   text    data     bss     dec     hex filename
 175292     912  492112  668316   a329c map-whole-program


The option is still alpha, as I'm currently hunting down some
linking bugs, however the results are very pleasing.  I'll
add the m2-whole-program option to the examples/map/Makefile.in
when it is fully operational.

  It is also interesting to note that the small amount of effort
required to implement this switch vs.  the increase in performance.  A
slight word of caution though - this flag is unlikely to work with
projects which mix the language dialects or mix pim/iso library
modules.

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]