Sign in to follow this  

boost::spirit, UNHOLY executable size

This topic is 4782 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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!)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4782 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this