Why is std.math slower than the C baseline?

Patrick Schluter Patrick.Schluter at bbox.fr
Fri Jun 5 21:24:06 UTC 2020


On Friday, 5 June 2020 at 19:48:55 UTC, H. S. Teoh wrote:
> On Fri, Jun 05, 2020 at 03:39:26PM -0400, Andrei Alexandrescu 
> via Digitalmars-d wrote:
>> On 6/4/20 10:39 AM, jmh530 wrote:
> [...]
>> > [...]
> [...]
>> > [...]
>> 
>> This needs to change. It's one thing to offer more precision 
>> to the user who consciously uses 80-bit reals, and it's an 
>> entirely different thing to force that bias on the user who's 
>> okay with double precision.
>
> +100!  std.math has been pessimal for all these years for no 
> good reason, let's get this fixed by making sure this gets 
> pushed through:
>
> 	https://github.com/dlang/phobos/pull/7463
>
> AIUI, it's currently only held up by a single 3rd party package 
> awaiting a new release. Once that's done, we need to rectify 
> this pessimal state of affairs.
>
What I don't understand is why the overloads are not implemented 
with templates. Isn't this exactly the use case they were 
invented for?


More information about the Digitalmars-d mailing list