2 ms·
Undefined behavior is very useful, and Java doesn't replace it with anything better for high-performance CPU programming. In particular, C loops can only be op
by astrange 8y ago
Undefined behavior is very useful, and Java doesn't replace it with anything better for high-performance CPU programming.
In particular, C loops can only be optimized because signed loop counters are assumed not to overflow. Java also doesn't have SIMD, and a very weak form of arrays as value types leads to pointer chasing.