...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
By far the most important thing you can do when using this library is turn on your compiler's optimisation options. As the following table shows the penalty for using the library in debug mode can be quite large. In addition switching to 64-bit code has a small but noticeable improvement in performance, as does switching to a different compiler (Intel C++ 15 in this example).
Table 22.1. Compiler Option Comparison on Windows x64
Function |
cl /Od (x86 build) |
cl /arch:sse2 /Ox (x86 build) |
cl /Ox (x64 build) |
---|---|---|---|
boost::math::cbrt |
5.05 |
1.20 |
1.00 |
boost::math::cyl_bessel_j (integer orders) |
4.38 |
1.00 |
1.02 |
boost::math::ibeta_inv |
4.52 |
1.11 |
1.00 |