Jump to content
  • Advertisement
Sign in to follow this  
aaron_ds

boost::spirit, UNHOLY executable size

This topic is 4994 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!