jpountz commented on PR #12782: URL: https://github.com/apache/lucene/pull/12782#issuecomment-1817146436
Thanks @easyice. I took some time to look into the benchmark and improve a few things, hopefully you don't mind. Here is the output of the benchmark on my machine now: ``` Benchmark (numBytesPerInt) (size) Mode Cnt Score Error Units GroupVIntBenchmark.byteArrayReadGroupVInt 1 64 thrpt 5 24.483 ± 0.345 ops/us GroupVIntBenchmark.byteArrayReadGroupVInt 2 64 thrpt 5 23.346 ± 0.288 ops/us GroupVIntBenchmark.byteArrayReadGroupVInt 3 64 thrpt 5 16.318 ± 0.062 ops/us GroupVIntBenchmark.byteArrayReadGroupVInt 4 64 thrpt 5 24.748 ± 0.993 ops/us GroupVIntBenchmark.byteArrayReadVInt 1 64 thrpt 5 17.767 ± 0.081 ops/us GroupVIntBenchmark.byteArrayReadVInt 2 64 thrpt 5 7.256 ± 0.013 ops/us GroupVIntBenchmark.byteArrayReadVInt 3 64 thrpt 5 5.546 ± 0.449 ops/us GroupVIntBenchmark.byteArrayReadVInt 4 64 thrpt 5 4.475 ± 0.021 ops/us GroupVIntBenchmark.byteBufferReadGroupVInt 1 64 thrpt 5 21.812 ± 0.485 ops/us GroupVIntBenchmark.byteBufferReadGroupVInt 2 64 thrpt 5 20.623 ± 1.454 ops/us GroupVIntBenchmark.byteBufferReadGroupVInt 3 64 thrpt 5 13.601 ± 0.299 ops/us GroupVIntBenchmark.byteBufferReadGroupVInt 4 64 thrpt 5 22.649 ± 0.662 ops/us GroupVIntBenchmark.byteBufferReadVInt 1 64 thrpt 5 22.147 ± 0.083 ops/us GroupVIntBenchmark.byteBufferReadVInt 2 64 thrpt 5 8.072 ± 0.116 ops/us GroupVIntBenchmark.byteBufferReadVInt 3 64 thrpt 5 4.554 ± 0.394 ops/us GroupVIntBenchmark.byteBufferReadVInt 4 64 thrpt 5 4.145 ± 0.674 ops/us ``` The benchmark used to read directly from the in-memory byte[] by calling `rewind()` , I changed that to force it to read directly from the directoly to make the comparison a bit more fair. -- 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