uchiha-asha opened a new pull request, #17024:
URL: https://github.com/apache/lucene/pull/17024

   Every `BlockPostingsEnum` allocates a `FixedBitSet` even for `PACKED` 
encoding, and a `freqBuffer` array even when frequencies are not requested. 
   This change allocates the bitset on first use and shares a read-only 
all-ones frequency buffer across enums that do not need frequencies.
   The change shows considerable timing and allocation gains in 
high-cardinality keyword sort and the single-segment 64-term disjunction.
   
   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.
   
   
   Workload | Segments | Baseline | Patched | Time change
   -- | -- | -- | -- | --
   Keyword sort, top 10 | 1 | 1,472 µs | 796 µs | −45.9%
   Keyword sort, top 10 | 20 | 1,271 µs | 878 µs | −30.9%
   OR of 64 IDs | 1 | 281 µs | 200 µs | −28.9%
   OR of 64 IDs | 20 | 2,397 µs | 2,201 µs | −8.2%
   OR of 1,024 IDs | 1 | 5,041 µs | 4,825 µs | −4.3%
   OR of 1,024 IDs | 20 | 44,312 µs | 38,928 µs | −12.2
   One dense term | 1 | 1,335 µs | 1,385 µs | +3.8%
   One dense term | 20 | 1,404 µs | 1,431 µs | +1.9%
   
   
   
   Workload | Segments | Baseline bytes/search | Patched bytes/search | 
Reduction
   -- | -- | -- | -- | --
   Keyword sort | 1 | 3.69 MB | 1.60 MB | 56.6%
   Keyword sort | 20 | 2.07 MB | 1.05 MB | 49.3%
   OR of 64 IDs | 1 | 611 KB | 476 KB | 22.0%
   OR of 1,024 IDs | 20 | 119.53 MB | 102.69 MB | 14.1%


-- 
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]

Reply via email to