Boost logo

Boost :

Subject: Re: [boost] [review] Multiprecision review (June 8th - 17th, 2012)
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-06-25 11:15:07


> FYI, Several years ago, implementing a Runge Kutta integrator and solver,
> we found that removing the explicit divide by zero check and relying on
> the hardware signal to propagate as an exception gave a 40 - 60%
> performance improvement. Though, I'm not sure how that translates to
> today's hardware/compilers and data types used.

Interesting - thanks!

I take it this was with native int's and not extended precision ones? I ask
because typical long division algorithms are rather expensive - as in O(N^2)
with a biggish constant as well.

That said, values that are small enough to fit in an int, but are actually
in an extended type "just in case" are an important use case, and as
supporting that case efficiently still needs more work, I guess I shouldn't
hamper that effort too much.... so I guess it's back to a compile time
switch....

John.


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