boost::spirit, UNHOLY executable size

Started by
7 comments, last by Max_Payne 19 years, 5 months ago
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
Advertisement
What compiler?
What compiler options?
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
/k /op /OMFG
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]
My stuff.Shameless promotion: FreePop: The GPL god-sim.
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!)
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.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
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
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
Let me get this straight, you're using Mingw and complaining about executable size?
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
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.

Looking for a serious game project?
www.xgameproject.com

This topic is closed to new replies.

Advertisement