lemire 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-480061875 > Would it be worth keeping a stupid pool of buffers for the bitmaps to serialize into? My expectation is that this... ``` ByteBuffer buffer = ByteBuffer.allocate(bitmap.serializedSizeInBytes()); ``` Is going to be pretty fast compared to doing... ``` byte[] buffer = new byte[bitmap.serializedSizeInBytes()]; ``` In some of the code above, the ByteBuffer does not escape, so if escape analysis works, it may not even stress the garbage collection. In fact, it may end up being free once the JIT compiler does it work. A distinct issue is that these byte arrays probably get created and garbage collected all the time. What do you do with the byte arrays? Could you be more direct?
---------------------------------------------------------------- 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]
