2 ms·
This sounds like exactly the sort of optimization that I'm always hearing a sufficiently smart compiler will make for me.
by tedunangst 14y ago
This sounds like exactly the sort of optimization that I'm always hearing a sufficiently smart compiler will make for me.
- PaulAJ 14y agoNo, because compilers are prohibited from changing the meaning of the program. Changing a lazy value to a strict value is only permitted when the compiler can prove that the value will always be evaluated. It can't do that for unboxed arrays because that is a global change, so it has to leave it to the programmer.