I just ran a few tests with several different build configurations.
Hardware: 2012 MacBook Pro (2.3Ghz Ivy Bridge i7 [i7-3615QM]), factory SSD and 16 GB of RAM.
Software: Mac OS X 10.11.1 with Xcode 7 (Apple LLVM version 7.0.0 clang-700.1.76). Fresh copy of Boost 1.59.0 from the website.
I tested the following build commands:
Default:
./bootstrap.sh && ./b2 -j N
Building forced binding of lib ++
./bootstrap.sh && ./b2 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" -j N
For each, I tried three different values โโfor N: 1 (one thread), 4 (corresponding physical cores) and 8 (matching hyper-thread cores).
Default Link:
- From 8, the build time was 6:45 minutes.
- With 4 build times, it was 7:22 minutes.
- From 1 build time was 22:58 minutes.
Binding libC ++:
- From 8, the build time was 4:35 minutes.
- With 4, the build time was 5:45 minutes.
- From 1 build time was 17:15 minutes.
Conclusion: Boost should not spend all day building a multi-core system with SSDs, even if it is not new. Building using the standard (dedicated stream) takes longer than parallel assembly. Boost build with clang on OS X benefits a bit from hyperthreading. Linking to libC ++ seems even faster.
source share