Naive node.js faster than naive LDC2?

Arjan arjan at ask.me.to
Sat Aug 22 18:47:39 UTC 2020


On Saturday, 22 August 2020 at 17:40:11 UTC, kinke wrote:
> On Saturday, 22 August 2020 at 16:15:14 UTC, H. S. Teoh wrote:
>> 3) std.math.fmax calling the C library (involving a PIC 
>> indirection to a
>> shared library as opposed to inlineable native D code).
>
> Yes, and that's because there's only a `real` version for fmax. 
> If upstream Phobos had proper double/float overloads, we could 
> uncomment the LDC-specific implementations using LLVM 
> intrinsics, which use (obviously much faster) SSE instructions:
>
> https://github.com/ldc-developers/phobos/blob/1366c7d5be65def916f030785fc1f1833342497d/std/math.d#L7785-L7798
>
> Number crunching in D could be significantly accelerated if the 
> people interested in it showed some love for std.math, but 
> we've had this topic for years.

Sound to me like a fantastic SAOC project.



More information about the Digitalmars-d mailing list