Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Performance Example

(performance.cpp)

This example provides an ad hoc performance test to verify that zero runtime overhead is incurred when using quantity in place of double. Note that performance optimization and testing is not trivial, so some care must be taken in profiling. It is also critical to have a compiler capable of optimizing the many template instantiations and inline calls effectively to achieve maximal performance. Zero overhead for this test has been verified using gcc 4.0.1, and icc 9.0, 10.0, and 10.1 on Mac OS 10.4 and 10.5, and using msvc 8.0 on Windows XP.


PrevUpHomeNext