[eigen] Re: Eigen 2 to Eigen 3 performance regressions with mapped matrices

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Here are some more results using keir's code + gcc 4.6.

I varied n (rows) and m (columns) from 1 to 10 and took the ratio of the time per call for eigen3 to eigen2. The general trend seems to be that the smaller the matrix, worse is the performance. Each test was repeated sufficient number of times so as to make statistical variations be insignificant.


     1     2     3     4     5     6     7     8     9    10
   ------------------------------------------------------------
 1| 17.75 14.20 14.80 12.50  9.62  9.88  9.00 10.38  8.90  9.00
 2| 13.80  8.88  8.33  7.60  7.18  6.15  5.60  5.31  4.83  4.74
 3| 12.17  9.62  8.89  7.64  6.77  6.43  5.81  5.39  5.00  5.30
 4| 10.29  7.18  6.23  5.67  5.06  4.57  4.43  4.32  4.42  3.93
 5| 10.86  8.20  6.62  6.20  5.67  5.05  4.87  4.58  4.50  4.29
 6|  9.50  6.46  5.56  5.05  4.35  4.19  3.87  3.67  3.69  3.46
 7| 10.00  6.62  5.94  5.42  4.70  4..37  4.06  4.03  3.81  3.66
 8|  9.00  5.44  5.05  4.46  4.32  3.94  3.89  3.63  3.64  3.58
 9|  9.22  6.20  5.20  4.79  4.61  4.27  3.95  3.79  3.60  3.54
10|  8.30  5.17  4.77  4.07  3.94  3.56  3.56  3.24  3.20  3.02

Sameer

On Tue, Jan 10, 2012 at 7:58 PM, Keir Mierle <mierle@xxxxxxxxx> wrote:
I've attached a microbenchmark that is similar in spirit to what we are doing with Eigen, that illustrates slowdown from Eigen 2 to Eigen 3. In particular, the benchmark does y += A*x, for A, x, y mapped unaligned dynamic but small dimension matrices. It could be that I have not chosen appropriate compiler flags. I am seeing performance 2x to 3x worse. Take a look at the header comments in the attached benchmark for more numbers.

Keir



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/