Hi Usuing gcc-2.8.1 and i586-pc-linux-gnu, compiled gpc with no optimization, O1, and O2 (except part where O2 would crash) Then used gpc to compile 4 of the demo programs. While there was little difference between the no optimazation and the O2 version, the O1 version produced programs that were significantly smaller: pi 248155 bytes power 253838 bytes schemademo 152992 bytes stringschemademo 153690 bytes just thought you'd like to know thanks, Russ <russwhit@mind.net>
Hi! Russ Whitaker wrote:
While there was little difference between the no optimazation and the O2 version, the O1 version produced programs that were significantly smaller:
That's interesting and explained by the fact that "no optimization" produces a lot of superfluous code and "optimization" optimizes for speed, not for size. So it's no wonder that programs get bigger with higher optimization. Peter -- http://home.pages.de/~Peter.Gerwinski/ - G-N-U GmbH: http://www.g-n-u.de Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - gpc-19990118 GnuPG key fingerprint: 9E7C 0FC4 8A62 5536 1730 A932 9834 65DB 2143 9422 keys: ftp://ftp.gerwinski.de/pub/keys/ - AntiSpam: http://spam.abuse.net
25-Sep-99 15:43 you wrote:
Hi
Usuing gcc-2.8.1 and i586-pc-linux-gnu, compiled gpc with no optimization, O1, and O2 (except part where O2 would crash)
Then used gpc to compile 4 of the demo programs.
While there was little difference between the no optimazation and the O2 version, the O1 version produced programs that were significantly smaller:
pi 248155 bytes power 253838 bytes schemademo 152992 bytes stringschemademo 153690 bytes
Are you shure that it's really size of programs and not debug info ? Using strip I got the following results: no optimization -O1 -O pi 6924 bytes 6076 bytes 6524 bytes power 7616 bytes 6400 bytes 7104 bytes schemademo 4948 bytes 4788 bytes 4788 bytes stringschemademo 5912 bytes 5688 bytes 5688 bytes Version, compiled with -O1 really smaller but not really significantly... gpc version 19990610, based on 2.95.1 19990816 (release) Hmm. Version 19990610 even if archive is called 19990813 ... P.S. It's i586-pc-linux-gnu with shared libgpc, libgmp, etc ...
participants (3)
-
Khimenko Victor -
Peter Gerwinski -
Russ Whitaker