11706 vs ([lno] Canonical iv creation)
Paolo Carlini
pcarlini@suse.de
Sun Mar 14 11:50:00 GMT 2004
Paolo Carlini wrote:
> It would be an improvement, a huge improvement.
Perhaps now I see a situation you care about: non-constant integer. In
that case, ::pow
issues a library call (irrespective of -ffast-math), whereas currently
std::pow uses the
binary algorithm which *may* be faster.
The price we pay for this possible - only possible, I haven't really
looked at the
assembler or benchmarked, yet - better performance in this case is that
we use the
binary algorithm *always* not only when -ffast-math.
And I see now where a __builtin_powi would be the optimal solution.
In the current situation, I still believe that all-in-all using simply
the builtins, for
pow(T, n) too is better, but I'll try to come up with some numbers.
Paolo.
More information about the Libstdc++
mailing list