easyice commented on issue #12826: URL: https://github.com/apache/lucene/issues/12826#issuecomment-1821299530
I ran the benchmark with Java 21 and using `MemorySegmentIndexInput`, but it seems slower than current, The `Score` is very similar to the code i wrote earlier :) The [code](https://github.com/easyice/lucene/commit/d9c6db11429f66cc602cc182b01d06a71ee12052) is pushed to my own repo, if you want to play with it. benchmark result, `numBytesPerInt`=0 mean number of bytes is uniformly distributed: ``` Using MemorySegmentIndexInput with Java 21; to disable start with -Dorg.apache.lucene.store.MMapDirectory.enableMemorySegments=false Benchmark (numBytesPerInt) (size) Mode Cnt Score Error Units GroupVIntBenchmark.byteArrayReadGroupVInt 0 64 thrpt 5 6.588 ± 0.496 ops/us GroupVIntBenchmark.byteArrayReadGroupVInt 1 64 thrpt 5 20.451 ± 0.528 ops/us GroupVIntBenchmark.byteArrayReadGroupVInt 2 64 thrpt 5 17.767 ± 1.780 ops/us GroupVIntBenchmark.byteArrayReadGroupVInt 3 64 thrpt 5 13.638 ± 1.253 ops/us GroupVIntBenchmark.byteArrayReadGroupVInt 4 64 thrpt 5 17.576 ± 2.064 ops/us GroupVIntBenchmark.byteArrayReadVInt 0 64 thrpt 5 4.963 ± 0.289 ops/us GroupVIntBenchmark.byteArrayReadVInt 1 64 thrpt 5 16.508 ± 1.304 ops/us GroupVIntBenchmark.byteArrayReadVInt 2 64 thrpt 5 5.818 ± 1.329 ops/us GroupVIntBenchmark.byteArrayReadVInt 3 64 thrpt 5 3.824 ± 0.587 ops/us GroupVIntBenchmark.byteArrayReadVInt 4 64 thrpt 5 3.134 ± 0.377 ops/us GroupVIntBenchmark.byteBufferReadGroupVInt 0 64 thrpt 5 4.722 ± 1.687 ops/us GroupVIntBenchmark.byteBufferReadGroupVInt 1 64 thrpt 5 16.488 ± 2.411 ops/us GroupVIntBenchmark.byteBufferReadGroupVInt 2 64 thrpt 5 14.032 ± 10.481 ops/us GroupVIntBenchmark.byteBufferReadGroupVInt 3 64 thrpt 5 10.880 ± 1.341 ops/us GroupVIntBenchmark.byteBufferReadGroupVInt 4 64 thrpt 5 17.019 ± 1.273 ops/us GroupVIntBenchmark.byteBufferReadVInt 0 64 thrpt 5 5.459 ± 0.394 ops/us GroupVIntBenchmark.byteBufferReadVInt 1 64 thrpt 5 17.620 ± 1.264 ops/us GroupVIntBenchmark.byteBufferReadVInt 2 64 thrpt 5 6.139 ± 0.260 ops/us GroupVIntBenchmark.byteBufferReadVInt 3 64 thrpt 5 4.373 ± 0.300 ops/us GroupVIntBenchmark.byteBufferReadVInt 4 64 thrpt 5 3.469 ± 0.214 ops/us GroupVIntBenchmark.memorySegmentReadGroupVInt 0 64 thrpt 5 10.626 ± 0.428 ops/us GroupVIntBenchmark.memorySegmentReadGroupVInt 1 64 thrpt 5 6.740 ± 0.501 ops/us GroupVIntBenchmark.memorySegmentReadGroupVInt 2 64 thrpt 5 6.714 ± 0.167 ops/us GroupVIntBenchmark.memorySegmentReadGroupVInt 3 64 thrpt 5 6.513 ± 0.352 ops/us GroupVIntBenchmark.memorySegmentReadGroupVInt 4 64 thrpt 5 10.797 ± 0.444 ops/us ``` In addition, if the number of bytes is using uniformly distributed, it is slower than I expected.(exclusive of `MemorySegmentIndexInput`) > we can use group-varint is SortingPostingsEnum I can try to do it this week :) -- 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