Boost logo

Ublas :

From: Frank Astier (fastier_at_[hidden])
Date: 2005-09-20 11:16:47

Hi -

I'm new to using ublas, and I want to get as much speed as possible
on sparse matrix X dense vector (multiplication). I have created a
simple test program that uses ublas::compressed_matrix and compares
it with my own hand crafted implementation of a sparse matrix.

I compile with -DNDEBUG -O3 -funroll-loops -mtune=G4 -mcpu=G4 -
10.4 on G4.

But my test shows it takes 39000 ticks for ublas to carry out the
multiplication on a 256x256 matrix with 10% non-zeros, when my hand-
crafted version takes only 1200 ticks. I did make sure that the
results are the same between ublas and the hand-crafted version down
to numeric_limits<float>::epsilon() (I work in float, and all the
numbers are between 0 and 1).

I don't want to roll my own, I want to use ublas. Am I missing a flag
setting or anything that could get more speed out of ublas?