[Boost-bugs] [Boost C++ Libraries] #11458: Performance improvement in boost/math.quaternion.hpp

Subject: [Boost-bugs] [Boost C++ Libraries] #11458: Performance improvement in boost/math.quaternion.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-07-09 15:51:00


#11458: Performance improvement in boost/math.quaternion.hpp
-------------------------------------------------+-------------------------
 Reporter: Scott Macintire <scott.macintire@…> | Owner: johnmaddock
     Type: Patches | Status: new
Milestone: To Be Determined | Component: math
  Version: Boost 1.58.0 | Severity:
 Keywords: | Optimization
-------------------------------------------------+-------------------------
 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11458>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC