Improve Direct Buffer accesses via VarHandle#15504
Conversation
|
This is blocked by #15486 |
|
@normanmaurer @chrisvest I see that adaptive is using mostly unpooled direct ByteBuf, whilst the "old" allocator |
|
The improvements, so far (at b2824591d322770f81f633fff11eb65142de4628) are: whilst the batchy numbers are still far behind |
|
@chrisvest I have to perform few benchmarks vs |
|
@normanmaurer @chrisvest for this, do I need to care about the jemalloc pooled buffers as well? Fyi I have tried before/after just with JDK 24 but it could be worthy to try with 11/17 as well - which meant doesn't have that good varHandle optimizations. |
I think it's fine to at least do them one at a time, in separate PRs. The pooled allocator will be used for cases where the adaptive allocator turns out to be a poor fit, and as an intermediate step in upgrading systems from 4.1 to 4.2. |
|
@franz1981 please rebase |
Motivation: With Unsafe gone the existing Direct's ByteBuf have too much overhead compared to the unsafe versions Modifications: Removed redundant bound checks and byte swapping conversions by using VarHandle Result: Faster safe Direct ByteBuffers (Fixes netty#15503)
b282459 to
533cd3b
Compare
|
Done ptal @normanmaurer |
|
If this look good @chrisvest we can go for it? |
|
Thanks, Franz! |
Motivation:
With Unsafe gone the existing Direct's ByteBuf have too much overhead compared to the unsafe versions
Modifications:
Removed redundant bound checks and byte swapping conversions by using VarHandle
Result:
Faster safe Direct ByteBuffers (Fixes #15503)