Disappointing math performance compared to GDC
Gabor Mezo via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Wed Oct 8 08:37:33 PDT 2014
On Wednesday, 8 October 2014 at 15:32:46 UTC, Trass3r wrote:
>>> * Never ever use std.math as you will get the insane 80-bit
>>> functions.
>>
>> What can one use to avoid this, and use the 64-bit numbers.
>
> Note that this is less of an issue for x86 code using x87 by
> default.
> On x64 though this results in really bad code switching between
> SSE and x87 registers.
> But vectorization is usually killed in any case.
>
> I personally use core.stdc.tgmath atm.
>
>>> * [...]
>> Is there any work to handle the above? Does GDC actually
>> suffer the same (or analogous) issues?
>
> I think there have been threads debating the unreasonable 'real
> by default' attitude.
> No clue if there's any result.
>
> And core.math is a big question mark to me.
>
> I don't know about gdc. Its runtime doesn't look much different.
Just for the record my benchmark code doesn't use math libraries,
I'm using logistics function approximations. That's why I thought
that the cause of my results hafta be the lack of the auto
vectorization.
More information about the digitalmars-d-ldc
mailing list