mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 21:18:58 +00:00
(index) Optimize SequenceOperations
This commit is contained in:
parent
a5585110a6
commit
00ab2684fa
@ -64,8 +64,8 @@ public class SequenceOperations {
|
||||
int[] values = new int[positions.length];
|
||||
|
||||
for (int i = 0; i < positions.length; i++) {
|
||||
if (indexes[i]++ < positions[i].size())
|
||||
values[i] = positions[i].getInt(indexes[i]) + iterOffsets[i];
|
||||
if (indexes[i] < positions[i].size())
|
||||
values[i] = positions[i].getInt(indexes[i]++) + iterOffsets[i];
|
||||
else
|
||||
return IntList.of();
|
||||
}
|
||||
@ -85,7 +85,7 @@ public class SequenceOperations {
|
||||
successes = 1;
|
||||
|
||||
if (indexes[i]++ < positions[i].size()) {
|
||||
values[i] = positions[i].getInt(indexes[i]) + iterOffsets[i];
|
||||
values[i] = positions[i].getInt(indexes[i]++) + iterOffsets[i];
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@ -98,7 +98,7 @@ public class SequenceOperations {
|
||||
// or until the end of the sequence is reached
|
||||
while (values[i] < max) {
|
||||
if (indexes[i]++ < positions[i].size()) {
|
||||
values[i] = positions[i].getInt(indexes[i]) + iterOffsets[i];
|
||||
values[i] = positions[i].getInt(indexes[i]++) + iterOffsets[i];
|
||||
} else {
|
||||
break outer;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user