easyice commented on code in PR #12841: URL: https://github.com/apache/lucene/pull/12841#discussion_r1421441005
########## lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/GroupVIntBenchmark.java: ########## @@ -140,10 +155,12 @@ public void init() throws Exception { } initByteBufferInput(docs); initArrayInput(docs); + initNioInput(docs); + initByteBuffersInput(docs); } @Benchmark - public void byteBufferReadVInt(Blackhole bh) throws IOException { + public void mmap_byteBufferReadVInt(Blackhole bh) throws IOException { Review Comment: Thank for you suggestions! the buffer size for both niofs and ByteBuffersDataInput(with s) should be 1024 in the case, and both did long to int cast, but ByteBuffersDataInput(with s) not become slow so much as niofs * **niofs** ~18% slow than using duplicate code * **ByteBuffersDataInput(with s)** ~7% slow than using duplicate code I tried remove the long to int cast, and increase block size, nothing changed on jmh benchmark result. all cases have no GC activity. it's an interesting issue. -- 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. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org