Tavian Barnes, a software engineer, writes about low-level performance, CPU quirks, Rust, and algorithms.
HN commenters link his explanation of the Alder Lake SHLX anomaly and his ray-box intersection post, which relies on IEEE 754 infinity behavior.
There are algorithms that behave correctly but require intermediate Inf or NaN to work. If I recall there is one related to finding bounding box intersections in ray tracing. I know when I introduce such code into a codebase I put a large "DO NOT CHANGE THIS..." style comment with an explanation so some enterprising programmer doesn't put some if statements in to remove what they think is an error, when it is not.
I'd suspect the same is true for NaN. These things were introduced for reasons. If you don't have a deep knowledge of why, don't assume everyone else is the same.
Edit: I found examples using a NaN and Inf intermediates to get a large speed increase [1,2].
[1] https://tavianator.com/2015/ray_box_nan.html
[2] https://tavianator.com/2011/ray_box.html
> Maybe RISC-V?
RISC-V is specified as a RISC (and allows very space-/power-efficient lower-end designs with the classic RISC design), but designed with macro-op fusion in mind, which gets you closer to a CISC decoder and EUs.
It's a nice place to be in tooling-wise, but it seems too early to say definitively what extensions will need to be added to get 12900K/9950X/M4 -tier performance-per-core.
In either case though, a bunch of the tricks that make modern CPUs fast are ISA-independent; stuff like branch prediction or [0] don't depend on the ISA, and can "work around" needing more instructions to do certain tasks, for one side or the other.
[0]: https://tavianator.com/2025/shlx.html
In IEEE 754, division by zero is well defined[1], and some algorithms rely on this[2].
Not sure how it relates to frame lag, some less-than-ideally-implemented iterative routine?
[1]: https://en.wikipedia.org/wiki/IEEE_754#Infinities
[2]: https://tavianator.com/2011/ray_box.html
Wrote up the presumed explanation here: https://tavianator.com/2025/shlxplained.html