Is there a way to improve the performance of an ublas product?
I have two matrices A, B that I want mulitply / add / sub / ...
In MATLAB vs. C ++ I get the following times [s] for the 2000x2000 matrix Operations
OPERATION | MATLAB | C++ (MSVC10) A + B | 0.04 | 0.04 A - B | 0.04 | 0.04 AB | 1.0 | 62.66 A'B' | 1.0 | 54.35
Why is there such a huge loss in productivity?
Matrices are only valid doubles. But I also need positively defined, symmetrical, rectangular products.
EDIT: Code is trivial
matrix<double> A( 2000 , 2000 );
EDIT 2: The result is averages of 10 attempts. The stddev level was less than 0.005
I would expect a 2-3rd order, but not 50 (!)
EDIT 3: Everything has been expanded in Release mode (NDEBUG / MOVE_SEMANTICS / ..).
EDIT 4: Pre-allocated matrices for product results did not affect runtime.
source share