boost::spirit, UNHOLY executable size
I'm doing some tests using boost::spirit for parsing and my executable size went from 1.2MB to 3.9MB. I know spirit does a lot of compile-time work, but is this normal?
Yikes!
Cheers
boost::spirit is pretty beefy. Such an increase in size doesn't sound unreasonable, but I must admit the one time I used spirit I didn't check the filesize. [looksaround]
Right, forgot to mention the compiler. Mingw 3.2
-O0 (no optimizations),
I just realized that I'm compiling a debug version, woe is me.
The release version is 563KB :) (what a difference!)
-O0 (no optimizations),
I just realized that I'm compiling a debug version, woe is me.
The release version is 563KB :) (what a difference!)
Indeed. At any rate, consider the using -Os, as well as the strip utility. strip is pretty much what makes the difference between a debug and a release version (removes the debugging information from the file). Dev-C++ might actually already be stripping 'release' versions.
Quote:From here
-s
Remove all symbol table and relocation information from the executable.
-Os
Optimize for size. -Os enables all -O2 optimizations that do not typically increase code size. It also performs further optimizations designed to reduce code size.
-Os disables the following optimization flags:
-falign-functions -falign-jumps -falign-loops
-falign-labels -freorder-blocks -fprefetch-loop-arrays
Quote:Original post by antareus
Let me get this straight, you're using Mingw and complaining about executable size?
I actually got smaller executable sizes when working with G++ than with VC++6 (for the same projects). And well, 563KB is still quite big for release. My game engine is about half that size, and it has plenty of code, along with external libraries to play ogg vorbis music files.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement