|
|
|
|
|
by xxs
885 days ago
|
|
>With that said, convincing a compiler to elide bounds checks (especially Java's JIT compiler) is a hugely frustrating (and for some algorithms futile) task. Adding explicit checks does work to a certain degree but it can change with the compiler, and it requires to keep checking the generated assembly - not fun (no unsafe, either but still) |
|
Especially in Java, because "the assembly" can change as the JIT evolves. What is optimized today may not be tomorrow.