I've notice a huge performance difference for different multiplication order in a quadratic product of the type
x.H() * R * x
where R is a NxN matrix, and x is a Nx1 vector.
This quadratic product is inside a for and is done lots of time for different matrices R.
When using the above form (without parantheses), which is equivalent to
(x.H() * R) * x
the total computation time was about 50 seconds.
On the other hand, when using the other possible order
x.H() * (R * x)
the time was about 5 seconds !!!!!
Is this a bug ? Can anyone explain this to me ?
I'm a beginner in it++, so maybe a just miss something...
Thank you all, Danilo
Log in to post a comment.
I've notice a huge performance difference for different multiplication order in a quadratic product of the type
x.H() * R * x
where R is a NxN matrix, and x is a Nx1 vector.
This quadratic product is inside a for and is done lots of time for different matrices R.
When using the above form (without parantheses), which is equivalent to
(x.H() * R) * x
the total computation time was about 50 seconds.
On the other hand, when using the other possible order
x.H() * (R * x)
the time was about 5 seconds !!!!!
Is this a bug ? Can anyone explain this to me ?
I'm a beginner in it++, so maybe a just miss something...
Thank you all,
Danilo