Boost logo

Ublas :

From: Sourabh (sourabh_at_[hidden])
Date: 2007-03-06 07:58:10


On Tue, 6 Mar 2007, Gunter Winkler wrote:

> Am Dienstag, 6. März 2007 11:42 schrieb Sourabh:
>
> > The above operation is taking 1 second for 200000 iterations. Not for
> > 1 iteration.
> >
> >
> > Just a strange thing, if I change the statement
> > densevector (i) = othervector (it.index ());
> >
> > to
> >
> > densevector (i) = (it.index ());
> >
> > time taken is increased. What could be the possible reason ?
>
> You should always define NDEBUG and use -O2 to have a meaningful time.
> Otherwise there will be index checks and some internal consistency
> checks on all operations.
>

I compiled using -O2 and -NDEBUG.