Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2007-03-07 12:33:26


On Wednesday 07 March 2007 11:58, Sourabh wrote:

> In both the cases, <omegas> is resized to pathgatevector.nnz(), already.
>
> Can we do a comparative study of these two examples and say why one
> approach is running in less time ?

depending on the compiler the two versions should result in the same
(optimized) code. However the sparse iterator have some internal overhead
which may "survive" the optimization. Using a plain int and direct adressing
of the containers is much less challenging for the optimizer.

mfg
Gunter

PS: I am on a conference this week, so I cannot spent much time on testing
before Monday.