3 ms·
> Optimizing compilers are usually used with flags that cause them to break IEEE754. For languages that don't mandate IEEE-754. There are plenty of languages t
by titzer 5y ago
> Optimizing compilers are usually used with flags that cause them to break IEEE754.
For languages that don't mandate IEEE-754. There are plenty of languages that do, like Java, JavaScript, C#, and WebAssembly.
It's worth noting that usually such optimizations are things like enabling algebraic reassociation and commutation (of primitives like +, -, /, ==, etc) operations, fused-multiply add, and others. It's really not clear to me how much disabling all those optimization costs in the real world.
Things get crazy when compilers want to do major reorganization of loops, optimizing stencils, polyhedral optimizations. I am not an expert here, but I think these rely on properties of float arithmetic that don't hold in all cases, i.e. they rely on UB.
- wumpus 5y ago> It's really not clear to me how much disabling all those optimization costs in the real world. I assure you that SPECcpu scores are a lot lower, if that's what you care about. And yes, it's extremely helpful to do major reorganization of loops if the program has multi-dimensional loops in the wrong order.