Check if `*Unsafe*ByteBuf` makes still sense in java9+
See original GitHub issueJava9 added more intrinsics for unaligned access which are part of jdk.internal.misc.Unsafe
and so normally not accessible (note this is NOT sun.misc.Unsafe). With all of these new intrinsics its not clear anymore if having Unsafe
ByteBuf
implementations really give us any gain beside be able to access the memory address. We should do benchmarks and check if when using Java9 and later we should maybe better use the non Unsafe
version while only allow to access the memory address if needed.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
java - Buffer vs Unsafe - Outside JVM - Stack Overflow
The first point where I think ByteBuffer wins over Unsafe is that ByteBuffer lets you add memory in a controlled fashion and has...
Read more >Elimination of all ByteBuffer Usage (for Java 8) #132 - GitHub
That means a new memory manager to be based on using addresses instead of ByteBuffers and allocating the address from unsafe: Unsafe().allocateMemory(size);.
Read more >Is using Unsafe really about speed or functionality?
If the difference is not compelling, using the simplest code possible makes more sense. i.e. using natural Java.
Read more >Removal of Unsafe in Java 9 - A disaster in the making - Reddit
Project Jigsaw which modularizes the JDK will ship with 9 and will make it much harder (read impossible) for 3rd party code to...
Read more >Need automated API compatibility check if compilation target ...
Let me re-check if I understand correctly: (1) The error occurs only if you compile against JRE 9 but run on JRE 7...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Let me close this… I will re-open another one for improvements if needed.
Did a few benchmarks and it seems like it still makes a lot of sense. We may be able to do some improvements tho. So let us keep this open.