Boost Users :
Subject: Re: [Boost-users] math.quaternion design issues
From: Sebastian Messerschmidt (sebastian.messerschmidt_at_[hidden])
Date: 2015-07-29 06:58:37
Without knowing the internals I would simply guess the choice towards
valarray stems from the fact, that element-wise mathematical operations
are defined for it.
> 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 mailing list
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