Closed ghadishayban closed 5 years ago
Thanks for the heads-up @ghadishayban, didn't know about that. I haven't been keeping up with the Java ecosystem, so the question is how prevalent is the adoption of Java 9+?
@ghadishayban Let's do this. I'll branch off unsafe
and push to varhandles
, and if you don't mind you can re-issue the PR
based on that branch. [edit; you have your branch]
On Java 9+ there is a new class VarHandle that allows reading a byte[] as a long[] without resorting to Unsafe. Benchmarks appear to be nearly identical with the unsafe branch...maybe a tiny bit faster.
Just going to put this draft PR here. Not asking for anything to be merged or any action to happen.