www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18559] New: std.math.* should stop using `real` overloads by

https://issues.dlang.org/show_bug.cgi?id=18559

          Issue ID: 18559
           Summary: std.math.* should stop using `real` overloads by
                    default
           Product: D
           Version: D2
          Hardware: x86
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: hsteoh quickfur.ath.cx

Using 80-bit reals on x86 causes major performance degradations in std.math
functions like atan().  This poor performance is on the brink of turning away a
significant group of potential D users, and needs to be taken seriously:

Cf.: https://forum.dlang.org/post/aepfpjkytvpnzgizvpwh forum.dlang.org

It's about time we take off our blinders and stop pretending that 80-bit
"extra" precision buys us anything.  Let 80-bit be an option if the user wants
to, sure.  But can we please, pretty please, change the default type in
std.math.* to double instead of real.  This is making our "fast code fast"
slogan look absolutely ridiculous when people run benchmarks like that linked
to above, and see D performing horribly slow compared to C++.

--
Mar 05 2018