jpountz commented on code in PR #13692:
URL: https://github.com/apache/lucene/pull/13692#discussion_r1733116688
##########
lucene/core/src/java/org/apache/lucene/codecs/lucene912/Lucene912PostingsReader.java:
##########
@@ -509,15 +547,14 @@ private void refillRemainder() throws IOException {
if (docFreq == 1) {
docBuffer[0] = singletonDocID;
freqBuffer[0] = totalTermFreq;
- docBuffer[1] = NO_MORE_DOCS;
docCountUpto++;
} else {
// Read vInts:
PostingsUtil.readVIntBlock(docIn, docBuffer, freqBuffer, left,
indexHasFreq, needsFreq);
prefixSum(docBuffer, left, prevDocID);
- docBuffer[left] = NO_MORE_DOCS;
docCountUpto += left;
}
+ Arrays.fill(docBuffer, left, docBuffer.length, NO_MORE_DOCS);
Review Comment:
I pushed a fix that only sets the last 4 values and ran luceneutil on
wikibigall with the usual tasks:
```
TaskQPS baseline StdDevQPS
my_modified_version StdDev Pct diff p-value
Prefix3 125.24 (4.3%) 120.81
(5.4%) -3.5% ( -12% - 6%) 0.021
OrNotHighMed 357.04 (4.5%) 348.41
(5.3%) -2.4% ( -11% - 7%) 0.121
HighTerm 435.37 (7.6%) 430.67
(10.1%) -1.1% ( -17% - 17%) 0.703
OrHighHigh 71.65 (1.7%) 71.02
(2.6%) -0.9% ( -5% - 3%) 0.215
IntNRQ 243.92 (14.0%) 242.19
(11.8%) -0.7% ( -23% - 29%) 0.862
OrHighNotLow 337.83 (7.3%) 335.80
(10.0%) -0.6% ( -16% - 18%) 0.828
OrNotHighHigh 209.81 (5.9%) 208.56
(7.4%) -0.6% ( -13% - 13%) 0.780
HighTermTitleBDVSort 18.85 (5.4%) 18.76
(6.3%) -0.5% ( -11% - 11%) 0.797
LowPhrase 40.63 (2.7%) 40.45
(2.9%) -0.4% ( -5% - 5%) 0.612
HighTermMonthSort 2914.69 (4.6%) 2901.70
(5.9%) -0.4% ( -10% - 10%) 0.790
TermDTSort 380.47 (6.6%) 379.03
(8.4%) -0.4% ( -14% - 15%) 0.874
PKLookup 284.98 (2.4%) 283.92
(2.3%) -0.4% ( -4% - 4%) 0.617
Wildcard 93.00 (3.5%) 92.69
(3.4%) -0.3% ( -7% - 6%) 0.760
OrHighNotMed 279.38 (6.2%) 278.54
(9.1%) -0.3% ( -14% - 15%) 0.903
Respell 51.13 (1.7%) 51.00
(1.6%) -0.3% ( -3% - 3%) 0.622
OrHighNotHigh 226.08 (7.3%) 225.79
(9.3%) -0.1% ( -15% - 17%) 0.961
HighSpanNear 5.59 (2.8%) 5.59
(2.7%) 0.0% ( -5% - 5%) 0.959
MedSloppyPhrase 10.01 (4.6%) 10.01
(3.8%) 0.0% ( -8% - 8%) 0.973
LowSpanNear 12.78 (2.7%) 12.80
(2.5%) 0.1% ( -4% - 5%) 0.893
HighTermTitleSort 138.24 (3.8%) 138.51
(3.7%) 0.2% ( -7% - 7%) 0.867
HighTermDayOfYearSort 828.14 (3.3%) 829.80
(5.0%) 0.2% ( -7% - 8%) 0.881
Fuzzy1 86.53 (2.1%) 86.78
(1.8%) 0.3% ( -3% - 4%) 0.651
HighIntervalsOrdered 2.40 (4.6%) 2.40
(4.4%) 0.3% ( -8% - 9%) 0.826
Fuzzy2 76.26 (2.5%) 76.53
(1.8%) 0.3% ( -3% - 4%) 0.611
MedPhrase 29.57 (2.7%) 29.68
(4.5%) 0.4% ( -6% - 7%) 0.759
AndHighHigh 55.69 (2.5%) 55.96
(2.1%) 0.5% ( -4% - 5%) 0.503
HighSloppyPhrase 9.65 (4.0%) 9.71
(3.2%) 0.6% ( -6% - 8%) 0.608
HighPhrase 4.29 (2.9%) 4.31
(2.4%) 0.6% ( -4% - 6%) 0.472
LowIntervalsOrdered 6.36 (1.8%) 6.41
(2.6%) 0.7% ( -3% - 5%) 0.311
MedIntervalsOrdered 14.73 (3.8%) 14.86
(4.1%) 0.9% ( -6% - 9%) 0.478
MedTerm 524.91 (7.5%) 529.70
(8.8%) 0.9% ( -14% - 18%) 0.724
OrHighMed 274.33 (2.3%) 276.85
(2.1%) 0.9% ( -3% - 5%) 0.181
MedSpanNear 3.76 (2.4%) 3.80
(2.4%) 1.1% ( -3% - 5%) 0.160
LowSloppyPhrase 11.49 (4.8%) 11.63
(5.6%) 1.2% ( -8% - 12%) 0.450
LowTerm 893.50 (6.5%) 908.30
(6.2%) 1.7% ( -10% - 15%) 0.411
OrHighLow 732.28 (4.1%) 747.40
(2.7%) 2.1% ( -4% - 9%) 0.062
OrNotHighLow 1158.98 (4.0%) 1184.55
(2.5%) 2.2% ( -4% - 9%) 0.038
AndHighMed 153.37 (2.7%) 156.82
(1.8%) 2.3% ( -2% - 6%) 0.002
AndHighLow 866.16 (4.3%) 886.05
(3.6%) 2.3% ( -5% - 10%) 0.066
```
The slowdown to `Prefix3` is probably real but I don't know how to fix it
without also slowing down e.g. `CountAndHighHigh`.
--
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]