Boost logo

Ublas :

Subject: Re: [ublas] eigen Vs. ublas
From: Umut Tabak (u.tabak_at_[hidden])
Date: 2011-04-11 10:17:19

On 04/11/2011 03:43 PM, Ungermann, Jörn wrote:
> Hi,
> as a side note, eigen uses a column-major compressed format as default, which is not that efficient for matrix-vector products (your mileage may vary). We use rather large, rather dense matrices (~1 percent nnz) and eigen does not perform that well for us, as it seems to have optimized only its column-major matrix-vector product.
> Also, for precision and memory bandwidth reasons, we use float for the matrix and double for the vectors, which I couldn't get to compile with eigen3 (with admittedly low effort).
> So here are the benchmarks for double precision matrix-vector performance between eigen, ublas and a manually tuned (unrolled, SIMD, prefetch) compressed-row_major-matrix-vector product. The matrix is ~ 100.000 x 100.000 with ~ 80000000 non-zeros. Measured is the average of 100 products.
> # test name, mean [s], stddev [s]
> Vanilla ublas:
> CompressedRowDouble, 0.313926, 0.000588<- faster than either eigen product
> CompressedColDouble, 0.526223, 0.000405
> Manually optimized ublas:
> CompressedRowDouble, 0.235913, 0.000136
Hi Jorn and all others,
I would like to thank all the kind posters for sharing their experiences
with timing results. They are really helpful to me to see the big picture.
Best regards,