id summary reporter owner description type status milestone component version severity resolution keywords cc 11458 Performance improvement in boost/math.quaternion.hpp Scott Macintire John Maddock "Quaternion makes use of `std::valarray` to make some trivial math operations take fewer LOC to implemen. `valarray` always mallocs, even for a small number of values, in this case 2 or 4. This has a huge performance impact on quaternion division. In an model I am working on, replacing the use of `valarray` with a normal stack array resulted in a 32% performance improvement. As the changes are not hard to implement and rely on no special libraries, I believe that the boost library can benefit from these changes. I've attached a modified header to this that should fix the issue, but do not have time or resources to fully test it for boost inclusion. I've done my best to emulate your style, but I assume someone will want things done slightly differently." Patches closed To Be Determined math Boost 1.58.0 Optimization obsolete