iverase opened a new pull request, #14358: URL: https://github.com/apache/lucene/pull/14358
While looking into some heap dumps, I notice in the DirectMonotonicReader.Meta objects hold by segments that the case of single value block is actually common. I wondered if we could specialize that case so we can create a faster, light weigh single block version. This commit makes DirectMonotonicReader a sealed abstractions with two possible implementations, one for multi-blocks and the other for single blocks. The multi-block implementation is very similar to the current implementation while the single block is more lightweight as it does not need to be holding arrays. The only side effect is that DirectMonotonicReader is bimorphic now, but that should be ok. I ran luceneutil and didnt' see much change: ``` TaskQPS baseline StdDevQPS my_modified_version StdDev Pct diff p-value OrHighNotMed 168.35 (4.3%) 163.80 (4.9%) -2.7% ( -11% - 6%) 0.064 HighTermTitleSort 36.96 (2.4%) 36.04 (4.2%) -2.5% ( -8% - 4%) 0.023 PKLookup 105.78 (6.1%) 103.28 (8.4%) -2.4% ( -15% - 12%) 0.306 HighTerm 228.90 (4.3%) 223.90 (5.3%) -2.2% ( -11% - 7%) 0.154 OrHighLow 330.01 (3.9%) 324.79 (3.5%) -1.6% ( -8% - 6%) 0.181 LowSpanNear 32.10 (6.5%) 31.61 (6.9%) -1.5% ( -13% - 12%) 0.469 Wildcard 103.26 (5.3%) 101.68 (7.1%) -1.5% ( -13% - 11%) 0.443 HighSpanNear 4.70 (4.7%) 4.63 (4.6%) -1.5% ( -10% - 8%) 0.309 OrNotHighLow 451.15 (3.5%) 444.47 (4.0%) -1.5% ( -8% - 6%) 0.215 HighSloppyPhrase 4.71 (4.8%) 4.64 (5.7%) -1.4% ( -11% - 9%) 0.415 Fuzzy2 36.81 (4.8%) 36.31 (5.9%) -1.4% ( -11% - 9%) 0.423 Fuzzy1 40.34 (2.9%) 39.81 (4.1%) -1.3% ( -8% - 5%) 0.233 OrHighHigh 75.21 (5.2%) 74.22 (5.1%) -1.3% ( -11% - 9%) 0.418 AndHighHigh 59.33 (5.0%) 58.57 (5.1%) -1.3% ( -10% - 9%) 0.426 AndHighMed 131.70 (3.2%) 130.05 (4.1%) -1.2% ( -8% - 6%) 0.286 range 2006.77 (7.0%) 1983.01 (8.5%) -1.2% ( -15% - 15%) 0.630 MedTerm 333.14 (4.2%) 329.23 (5.2%) -1.2% ( -10% - 8%) 0.429 LowIntervalsOrdered 6.16 (5.8%) 6.09 (6.5%) -1.1% ( -12% - 11%) 0.564 OrHighNotHigh 206.93 (3.4%) 204.61 (4.4%) -1.1% ( -8% - 6%) 0.366 MedSpanNear 15.36 (2.9%) 15.20 (3.7%) -1.0% ( -7% - 5%) 0.323 OrHighMed 135.41 (3.2%) 134.25 (2.8%) -0.9% ( -6% - 5%) 0.373 LowTerm 528.68 (4.1%) 524.30 (4.8%) -0.8% ( -9% - 8%) 0.556 OrHighNotLow 238.88 (4.2%) 237.11 (4.7%) -0.7% ( -9% - 8%) 0.599 MedSloppyPhrase 38.80 (2.7%) 38.55 (3.0%) -0.6% ( -6% - 5%) 0.483 MedIntervalsOrdered 43.96 (9.3%) 43.68 (9.2%) -0.6% ( -17% - 19%) 0.831 OrNotHighHigh 301.25 (2.5%) 299.46 (3.2%) -0.6% ( -6% - 5%) 0.520 HighIntervalsOrdered 7.35 (6.1%) 7.31 (6.8%) -0.5% ( -12% - 13%) 0.792 BrowseDayOfYearTaxoFacets 2.03 (13.2%) 2.02 (14.7%) -0.4% ( -25% - 31%) 0.920 OrNotHighMed 229.85 (2.8%) 228.86 (4.2%) -0.4% ( -7% - 6%) 0.701 BrowseDateTaxoFacets 2.01 (12.5%) 2.00 (15.0%) -0.4% ( -24% - 30%) 0.922 MedPhrase 77.28 (2.9%) 77.10 (3.1%) -0.2% ( -6% - 5%) 0.799 BrowseRandomLabelTaxoFacets 1.49 (12.2%) 1.49 (16.4%) -0.2% ( -25% - 32%) 0.960 Respell 22.59 (3.9%) 22.55 (4.1%) -0.1% ( -7% - 8%) 0.908 LowSloppyPhrase 76.40 (2.7%) 76.35 (3.2%) -0.1% ( -5% - 6%) 0.938 AndHighLow 478.69 (5.3%) 479.27 (7.1%) 0.1% ( -11% - 13%) 0.951 IntSet 253.58 (4.6%) 254.02 (5.8%) 0.2% ( -9% - 11%) 0.915 AndHighMedDayTaxoFacets 71.03 (2.9%) 71.30 (5.3%) 0.4% ( -7% - 8%) 0.780 BrowseMonthTaxoFacets 2.11 (11.6%) 2.12 (9.6%) 0.4% ( -18% - 24%) 0.902 HighTermMonthSort 640.17 (4.0%) 643.80 (4.9%) 0.6% ( -8% - 9%) 0.690 Prefix3 401.26 (8.0%) 403.59 (9.4%) 0.6% ( -15% - 19%) 0.834 BrowseMonthSSDVFacets 2.52 (13.7%) 2.54 (14.3%) 0.9% ( -23% - 33%) 0.837 HighPhrase 31.52 (3.0%) 31.83 (5.2%) 1.0% ( -7% - 9%) 0.465 HighTermTitleBDVSort 20.13 (3.8%) 20.33 (4.8%) 1.0% ( -7% - 9%) 0.455 LowPhrase 91.85 (4.1%) 93.07 (3.3%) 1.3% ( -5% - 9%) 0.258 BrowseDayOfYearSSDVFacets 2.54 (14.9%) 2.58 (14.7%) 1.3% ( -24% - 36%) 0.776 BrowseRandomLabelSSDVFacets 1.60 (8.3%) 1.63 (7.3%) 1.5% ( -13% - 18%) 0.555 IntNRQ 167.29 (4.0%) 169.92 (4.1%) 1.6% ( -6% - 10%) 0.220 AndHighHighDayTaxoFacets 11.05 (3.9%) 11.24 (3.7%) 1.8% ( -5% - 9%) 0.139 OrHighMedDayTaxoFacets 1.74 (4.6%) 1.77 (6.1%) 1.9% ( -8% - 13%) 0.268 TermDTSort 82.17 (4.0%) 84.11 (6.1%) 2.4% ( -7% - 13%) 0.148 MedTermDayTaxoFacets 9.83 (7.2%) 10.08 (4.2%) 2.5% ( -8% - 14%) 0.183 HighTermDayOfYearSort 72.30 (4.7%) 74.29 (5.7%) 2.8% ( -7% - 13%) 0.094 BrowseDateSSDVFacets 0.58 (13.0%) 0.61 (17.2%) 5.8% ( -21% - 41%) 0.227 ``` -- 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