|
Boost : |
From: Ivan Matek (libbooze_at_[hidden])
Date: 2025-01-21 20:19:30
On Tue, Jan 21, 2025 at 9:02â¯PM Peter Dimov <pdimov_at_[hidden]> wrote:
> Ivan Matek wrote:
> > For me the interesting thing about comparisons beside Peter improvements
> is
> > that benefits from normalization seem to depend on how many times user
> > does certain operation.
> >
> > user does
> > auto x = a * b * c * d * e;
> > x < y;
>
> Multiplication probably won't suffer much, but addition with different
> signs
> might take quite a hit because of normalization of the result.
>
> One could in theory engage the type system here and make operator+ for
> decimal64_fast return decimal64_fast_non_normalized, which will then
> only be normalized once on the final store to x.
>
Yeah, that would be nice, but as you said maybe overkill.
Also we could have ugly way of doing the multiplication with function...
but again as you said without benchmarks not sure it is worth it
auto x = mult(a, b, c, d, e);
On Tue, Jan 21, 2025 at 8:52â¯PM Peter Dimov via Boost <boost_at_[hidden]>
wrote:
>
> Also, see how much better is_zero becomes.
>
> wow...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk