[cfe-dev] Floating-point performance question
Richard Hadsell
hadsell at blueskystudios.com
Mon Sep 9 10:28:47 PDT 2013
On 09/09/2013 11:49 AM, Richard Hadsell wrote:
> This may not be necessary. I found another clue here, in section 1.1: https://sourceware.org/newlib/libm.html
>
> When I tested the initial value of libm's |_LIB_VERSION, I found that my G++ version starts up with _IEEE_, the fastest mode (no exception handling, no warnings, ignoring errno. The Clang++ version starts up with _POSIX_, which sets errno correctly.
>
> I will test our code's behavior, when I set ||_LIB_VERSION to ||_IEEE_ explicitly, and I'll let you know if this explains the difference.
> |
Unfortunately, that did not help. The version change did not improve the behavior of exp2 -- it is still slower than pow. I will have to stick with my workaround, giving pow a const double with the value 2.0 instead of a literal 2.0.
You may continue to consider how Clang++ could be controlled to avoid converting to the slower function.
--
Dick Hadsell 203-992-6320 Fax: 203-992-6001
Reply-to: hadsell at blueskystudios.com
Blue Sky Studios http://www.blueskystudios.com
1 American Lane, Greenwich, CT 06831-2560
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130909/346c40cc/attachment.html>
More information about the cfe-dev
mailing list