uchiha-asha opened a new pull request, #17045: URL: https://github.com/apache/lucene/pull/17045
This change optimizes `DocIdSetBuilder#build` when the matches are clustered in a small part of the doc ID space (a timestamp range on data indexed in time order, or a sorted index). It sorts deltas from the minimum doc ID when that saves at least one radix pass, and adds the minimum back afterwards. Benchmarks: new JMH benchmarks (not part of this PR), baseline and patched lucene-core swapped on identical indexes, 3 forks x 5 iterations, 2 GB heap, JDK 25.0.5, a shared 4-vCPU cloud VM without CPU isolation. Workload (point range query) | Baseline | Patched | Change -- | -- | -- | -- 5,000 clustered hits, 20M-doc segment | 117.0 ± 4.0 µs | 79.3 ± 3.2 µs | -32% 50,000 clustered hits, 20M docs | 1200 ± 28 µs | 834 ± 35 µs | -31% 3,000 clustered hits, 1M docs | 84.1 ± 6.1 µs | 60.2 ± 8.4 µs | -28% 5,000 scattered hits, 20M docs | 389 ± 20 µs | 405 ± 33 µs | +4% (noise) 10 clustered hits, 1M docs | 15.8 ± 2.1 µs | 15.4 ± 2.8 µs | -3% (noise) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
