Free Software programmer
Subscribe to a syndicated
feed of my weblog, brought to you by the wonders of
This blog existed before my current employment, and obviously
reflects my own opinions and not theirs.
This work is licensed under a Creative Commons Attribution 2.1 Australia License.
Categories of this blog:
All 2008 posts
All 2007 posts
All 2006 posts
All 2005 posts
All 2004 posts
Wed, 18 May 2005
As everyone knows, I'm a huge
Wesnoth fan. I found an interview with the lead developer from
last year on
PCTechTalk where he complained about compile times with g++.
So I downloaded the CVS and did some testing, and sent him the
results. Most of these are probably fairly obvious to people, but the
figures are interesting:
- Raw build time
make clean; time make > /tmp/out
487.80user 26.41system 8:59.65elapsed
- Build time without -O2
make clean; time make CXXFLAGS=-g > /tmp/out
193.98user 14.84system 4:00.92elapsed
- Built time without -O2, one file touched
touch src/global.hpp; time make CXXFLAGS=-g > /tmp/out
191.53user 9.52system 3:43.92elapsed
- Build time with ccache installed, one file touched:
touch src/global.hpp; time make CXXFLAGS=-g > /tmp/out"
10.45user 2.04system 0:37.46elapsed
- Built time with ccache, one file touched, output to screen:
touch src/global.hpp; /usr/bin/time make CXXFLAGS=-g"
10.73user 2.06system 0:47.85elapsed
Summary: don't use -O when developing, use
distcc. If you're still
not fast enough you can try suppressing all screen output (probably
not worth the pain of not seeing what's happening), or
using pre-compiled headers (in recent gcc versions).
[/tech] permanent link