Here’s the time it takes to compile some C++ code on various machines with various versions of GCC. The list will be extended whenever the opportunity arises.
All benchmarks were run with warm disk cache, however the benchmark includes not only calculation of the dependencies, but also linking a dozen libraries and several dozen executables, and therefore depends a little on disk performance, too.
MacBook
MacBook (Late 2008 Unibody), Intel Core 2 Duo P8600 @ 2.4 GHz (1 CPU, 2 Cores, 2 Threads), 4 GB RAM (256 MB for GFX, 1 display @ 1600×1200x32bpp), Mac OS X 10.5.6, G++ 4.3.2, 32 bit.
# time make -j 3
real 6m11.769s
user 10m27.699s
sys 1m15.926s
Nehalem
Asus P6T Deluxe, Intel Core i7 965 EE @ 3.2 GHz (1 CPU, 4 Cores, 8 Threads), 6 GB RAM, LFS w/Linux 2.6.28, G++ 4.3.2, 64 bit.
# time make -j 15
real 1m22.883s
user 9m27.460s
sys 0m28.319s
Same box with HyperThreading disabled, i.e. Intel Core i7 965 EE @ 3.2 GHz (1 CPU, 4 Cores, 4 Threads).
# time make -j 7
real 1m36.762s
user 5m53.878s
sys 0m19.923s
Opteron
Sun Fire X4140, AMD Opteron 2356 @ 2300 MHz (2 CPUs, 8 Cores, 8 Threads), 32 GB RAM, RedHat Enterprise Linux w/Kernel 2.6.18-92.el5, G++ 4.1.2-42, 64 bit.
# time make -j 15
real 1m38.732s
user 10m53.521s
sys 0m57.669s
Pentium IV
Dell 6850, Intel Pentium IV Xeon 7140 @ 3.4 GHz (4 CPUs, 8 Cores, 16 Threads; physical and maximal for Xen-partition), 12 GB RAM (in Xen-partition; 16 GB physical), Debian w/Kernel 2.6.18.8-xen, G++ 4.3.0, 64 bit.
# time make -j 31
real 1m51.121s
user 21m47.360s
sys 3m48.360s
Solaris 8
Sun Fire V880, Sun UltraSparc III @ 900 MHz (8 CPUs, 8 Cores, 8 Threads), 16 GB RAM, Solaris 8, G++ 4.0.2, 32 bit.
# time make -j 15
real 8m33.965s
user 60m6.360s
sys 3m50.945s
Solaris 10
Sun Fire 15000, Sun UltraSparc III @ 1200 MHz (4 CPUs, 4 Cores, 4 Threads), 8 GB RAM, Solaris 10, G++ 4.3.0, 64 bit.
# time make -j 7
real 13m34.743s
user 43m19.227s
sys 5m33.501s