[Issue 18559] New: std.math.* should stop using `real` overloads by default

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 5 20:09:22 UTC 2018


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 at puremagic.com
          Reporter: hsteoh at 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++.

--


More information about the Digitalmars-d-bugs mailing list