Boost logo

Boost :

From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2004-01-17 08:41:51


Guillaume Melquiond wrote:
> The fix seems correct to me, but I'm not sure I like it. As Sylvain
> pointed it out to me, changing the return type is not the best thing to
> do. I benchmarked it with a small test (only subtractions) compiled with
> GCC (-O3 optimization). And it shows a huge performance drop when using
> interval<long double>: 70% slower!
>
> So I'm obviously against forwarding this fix to the release branch.

The problem shows with any compiler where a "long double" is not
stored in memory completely, but as a double only. This is possible
and legitimate. A template indirection should be conditional on
"sizeof(long double) == 8" (use the workaround in this case).

Jens Maurer


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