std.math performance (SSE vs. real)
via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jul 2 04:42:12 PDT 2014
On Wednesday, 2 July 2014 at 08:52:25 UTC, Iain Buclaw via
Digitalmars-d wrote:
> The crucial thing here is that the layout of float/double types
> are
> IEEE 754 are compatible. :)
That's nice of course, if you import/export, but hardly the only
crucial thing.
Implied correctness and warnings when assumptions break is also
important…
> These behaviours you describe only affect the FP control
> functions in
> std.math, which are the only thing platform specific, and can
> only be
> written in inline assembly anyway...
It affects the backend.
It affects vectorization. (NEON is not IEEE754 AFAIK)
It affects what a conforming D compiler is allowed to do.
It affects versioning.
E.g. you can have a flags IEEE754_STRICT or IEE754_HAS_NAN etc
and use versioning that dectects the wrong compiler-mode.
More information about the Digitalmars-d
mailing list