Naive node.js faster than naive LDC2?

Avrina avrina12309412342 at
Sat Aug 22 22:09:04 UTC 2020

On Saturday, 22 August 2020 at 21:20:36 UTC, Andrei Alexandrescu 
> On 8/22/20 3:34 PM, Avrina wrote:
>> On Saturday, 22 August 2020 at 19:20:34 UTC, Andrei 
>> Alexandrescu wrote:
>>> On 8/22/20 1:40 PM, 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:
>>>> 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.
>>> Ow, do we still suffer from that? Sigh.
>>> It's 10 minutes of work - as much as writing a couple of 
>>> posts, and much more satisfactory.
>> Cos, sin, tan, asin, acos, atan, etc.. There's still more, 
>> putting in the actual work that std.math needs is going to 
>> take more than 10 mins.
> 1. Linear time for small n is fine and does not affect the 
> argument.

What argument?

> 2. Incremental is still fine.

It can introduce subtle bugs and problems with precision, flip 
flopping between float, double, and real. If it is done all at 
once, it will only happen once, not every time someone feels like 
spend 10 mins doing a little bit of work to change one function. 
It really shouldn't have been implemented this way in the first 

> 3. Work has actually be done by Nick Wilson in 

A dead pull request? Not unusual.

More information about the Digitalmars-d mailing list