Re:JEP Draft: Deprecate memory-access methods in sun.misc.un...
by iscoelho on Wednesday January 17, 2024 @03:34AM
(#39024953)
> but it may prevent some other optimizations.
I see this mentioned a few times in this thread, but I haven't experienced this in practice (and I've written a lot of unsafe in Java). Are there any examples of this?
The stuff gets worse with DirectByteBuffers as the JIT has to work harder. Unsafe allows to 'remove' all bound checks, but it may prevent some other optimizations.