richardstartin commented on issue #7408: upgrade to RoaringBitmap 0.8.0 and 
serialise directly to ByteBuffer
URL: https://github.com/apache/incubator-druid/pull/7408#issuecomment-480072686
 
 
   The underlying array is always going to get allocated, unless it's smaller 
than 64 elements in which case it may get scalarised, but knowing the 
serialisation format that just isn't going to happen. 
   
   There might be an opportunity here for someone with more skin in the game to 
do some refactoring to avoid the byte[] allocation entirely. A quick glance at 
the code indicates that the result of `toBytes()` gets written into 
`WriteOutBytes`, every implementation of which delegates to a `ByteBuffer`. It 
should be possible to remove some of the indirection and supply the buffer 
directly to the bitmap, avoiding unnecessary allocations, maybe resulting in 
better jitted code. 
   
   Of course, there are engineering tradeoffs and this may not actually be a 
performance hot spot... 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to