Registered Member
|
Hi,
I've been using an older version of Eigen 3 and I am very satisfied with its performance. Now I am about to update to the release version of Eigen 3 and there is a little thing that concerns me, namely the reported Bug 51 "no malloc in fixed-size products" and the following description by Benoit: "Fixed-size matrix products should never malloc. It's OK if this means that they never do any cache-friendliness/parallellization. Guaranteeing no malloc is more important." Will the omission of cache-friendliness/parallelization slow down the computation ? I only use matrices of size 4x4 and 20x20. By the way, in the new benchmark graph on the website, what do you mean by matrix size (x-axis). Is it the total number of elements in the matrix, or the length of the row/column ? Thanks ! |
Moderator
|
first of all, we call matrix size the number of cols or rows assuming the matrix is square.
So for matrix size larger than about 8, fast matrix products requires some temporary buffers to reorganize the data to enable efficient vectorization and cache friendliness. What we are currently doing is to allocate these buffer using static allocation when the matrix sizes are known at compile time, so don't worry about the performance! |
Registered Member
|
Thanks for the quick answers !
|
Registered Member
|
Hi Gael,
I have updated my current version of Eigen (it was the development branch of the 3.0 version) to the release one. Unfortunately, what I was afraid of most seems to happen. My program now runs almost 2 times slower than before ! I think the problem is related to the aforementioned fixed-size products, since I only use fixed-size matrix-vector product of either size 4 or 20. Can you please tell me what should I change now to make my program run at least as fast as it was before ? Otherwise I am forced to move back to the unreleased version. Thanks ! |
Moderator
|
can you paste the code of a typical operation, there is no reason matrix-matrix or matrix-vector products are slower now. It should be the opposite. Also can you precise your compiler version and system. Also make sure you bench in optimized mode (-O2 for gcc)
|
Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar