Boost logo

Boost :

From: Steven Watanabe (steven_at_[hidden])
Date: 2007-04-02 16:18:09


AMDG

Martin Schulz <Martin.Schulz <at> synopsys.com> writes:

> It is just the noncontradicted repetition of the "zero-overhead" keyword
>
> over and over again, that irritates me. This indicates that
> performance is not so unimportant anyhow.

I suppose that the most correct statement is that
quantity imposes the same overhead as any wrapper
around a plain double. From looking through
the assembler output of unit_example_14 it appears
that msvc optimized register usage better for double.

> in fact the whole example is little meaningfull. It can't prove that
> the library is fast, nor that it is slow.

I agree. The main thing that the example tests
is the compiler's ability to play games. I just
tried multiplying 1000 * 1000 matrices together
using msvc 8.0 with /Ox /Ot /Ob2 /Oy The results
are effectively the same for double and quantity.

ublas:
double = 16.282 seconds
quantity = 16.547 seconds

tiled:
double = 1.875 seconds
quantity = 1.875 seconds

> Consequently, I opt against rational exponents, as I consider them to be
>
> an obstacle for such an integration.

How so? At runtime you can use boost::rational

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk