4 ms·
Regardless, those optimisations are available on the respective JITs. RyuJIT target CPU modes, breaking change due to dropping support for older hardware, htt
by pjmlp 3mo ago
Regardless, those optimisations are available on the respective JITs.
RyuJIT target CPU modes, breaking change due to dropping support for older hardware,
https://github.com/dotnet/docs/issues/48045 https://github.com/dotnet/docs/issues/48045
> Native Image now targets x86-64-v3 architecture by default on AMD64 and provides a new -march option to specify target compatibility. Use -march=compatibility for best compatibility or -march=native for best performance if a native executable is deployed on the same machine or on a machine with the same CPU features. To list all available machine types, use -march=list.
https://www.graalvm.org/release-notes/JDK_20 https://www.graalvm.org/release-notes/JDK_20
- aw1621107 3mo ago> those optimisations are available on the respective JITs. I'd assume they aren't applied by default and/or without the programmer explicitly opting in to those altered semantics, though. Would you be able to show otherwise? I don't see how changing targeted instruction sets is relevant here as the instructions you use is orthogonal to whether you assume floating point operations are associative.
- afdbcreid 3mo ago> Regardless, those optimisations are available on the respective JITs. I'm pretty sure this is wrong. No JS engine, RyuJIT or or HotSpot break IEE-754. Java does have intrinsics for algebraic floating point operations (but does not apply them by default and I don't think they're exposed), the other I don't think.
- pjmlp 3mo agoI linked the documentation....
- afdbcreid 3mo agoI'm not sure what you tried to prove by those docs, but they don't say that they deviate from IEEE-754.
- jcranmer 3mo agoI did a deep dive a while back into the floating-point semantics of many languages, included JIT'd languages, which mostly uncovers that very few languages are particularly precise in their specification. The tl;dr for the relevant languages here is: * Java requires full IEEE 754 conformance (and bounds ULPs on java.lang.Math functions, although not fully correctly-rounded), although (now removed) strictfp permitted a slightly more relaxed mode to make it easier to implement using x87 FPU arithmetic. * C# has license for excess precision mode and denormal flushing. * JS is strict IEEE 754 conformance, except for math library functions (which can be more approximate). * Go permits FMA contraction (but is otherwise silent). * Most other interpreted/JIT'd languages pretty much go "you get your machine floating-point." And, FWIW, all of those floating-point semantics are orthogonal to things enabled by -ffast-math or similar flags! The only languages that really discuss such things are C (in a TS nobody implements), Fortran (which lets you rearrange expressions as long as you preserve parentheses), Julia (which has a fast_fma-like function and a fast-math macro), and now Rust.