Registered Member
|
Hello,
I am trying to solve several quadratic problem of the form x'Ax where the xs are varying but A ( which is symmetric, dense) is the same. Since I there will be far greater xs then the dimension of A I want to precalculate as much as possible. So, I first to:
Then for each x:
However when I compare to just: (in a loop when A is 4x4)
I notice no increase in speed for the first case, even though U is triangular, A is full. Am I doing something wrong? or is eigen doing something smart with A*x? thanks |
Moderator
|
For 4x4 matrices exploiting symmetry is slower because it prevents vectorization. Moreover, make sure you are using a Matrix<?,4,4> type for A and Matrix<?,4,1> for vectors.
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]