This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: 11706 vs ([lno] Canonical iv creation)
Paolo Carlini wrote:
With just a 3-line patch the generated code would be much better than
now, nobody in the world would notice the the difference from a
correctness point of view, and that's it.
Well, not only that: simply using ::pow, __builtin_powf and
__builtin_powl, would allow for a *better* precision/performance
trade-off (-ffast-math), consistent with the one used elsewhere by the
compiler
(see Roger's message). After all, this is the point that really
convinced me that, short term at least, Richard
is right.
Currently, irrespective of -ffast-math we use the binary power
algorithm, and the behavior is different from
that obtained using C-pow, which is optimized or not to a library call,
depending on -ffast-math.
Gaby, admit it. For an user, not knowing the internals, a library using
::pow, __builtin_powf and __builtin_powl
in the implementation of pow(T, n) performs **vastly** better from
**every** possible point of view than
what we currently have. It would be an improvement, a huge improvement.
Paolo.