Benchmarks - LDC vs GDC
Cecil Ward
cecil at cecilward.com
Wed Jun 28 23:29:36 UTC 2023
On Tuesday, 27 June 2023 at 19:58:57 UTC, Walter Bright wrote:
> Be leery of using fastmath switches unless you are very
> knowledgeable about fp math and how fastmath changes it.
>
> DMD doesn't have a fastmath switch for good reason.
Walter, your warning is appreciated. I read some of the GCC
documentation, but I’ve no intention of going near the fast math
thing in a production program as indeed I haven’t thought it
through enough.
Since DMD doesn’t have such a thing, then fast-math needs to be
banned in benchmarks that include DMD otherwise it’s not a level
playing field.
Isn’t the main thing ignoring infinities and NaNs? I don’t think
that’s all there is to it though. I would say, in my extremely
limited exposure to floating point, that if you have debugged
your code then infinities and NaNs should not be encountered
anyway unless you have possible special cases to deal with
relating to input that you’re not in control of.
More information about the Digitalmars-d
mailing list