This question is perhaps somehow odd, but how can I speed up g++ compile time? My C++ code heavily uses boost and templates. I already moved as much as possible out of the headers files and use the -j option, but still it takes quite a while to compile (and link).
Are there any tools out there which analyse my code and point out bottle-necks for the compiler? Or can one somehow profile the compiler running on my code? This would be really nice, because sometimes I have the impression, that I spent too much time staring at the compiler console log ...
What has been most useful for me:
-j3
globally for make. Make sure your dependency graphs are correct in your Makefile, though, or you may have problems.-O0
if you're not testing execution speed or code size (and your computer is fast enough for you not to care much about the (probably small) performance hit).