Boost logo

Boost Users :

Subject: [Boost-users] math.quaternion design issues
From: Matwey V. Kornilov (matwey.kornilov_at_[hidden])
Date: 2015-07-29 06:52:14


Hello,

I am facing the following performance issues due to internals of quaternion.

abs(q) function is quite slow, and most of the time (according to
callgrind) is taken to create valarray which is easily unnecessarily
here. valarray requires doing malloc and free, because it is dynamic
container, at the same time the size of quaternion is 4 and it is fixed.

So, was was the purpose to use std::valarray internally?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net