Registered Member
|
Hello
I want to premultiply 3xN matrices by a 3x3 matrix, i.e., to transform 3D points, like
after initializing the matrices:
I have evaluated this two versions
and
the NT repetition are done just to compute average time I am surprised the the column by column multiplication is about 4/5 time faster than the direct multiplication (and the direct multiplication is even slower if I do not use the .noalias(), but this is fine since it is doing a temporary copy) I'have tried to change NUMCOLS from 0 to 1000000 and the relation is linear I'm using VS2013 and compiling in release The next figure shows on X the number of columns of the matrix and in Y the avg time for a single operation, in blue the col by col multiplication, in red the matrix multiplication Any suggestion why this happens? |
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]