Branchless inner page check for Node256

This commit is contained in:
2024-06-26 18:28:41 -07:00
parent 6520e3d734
commit bfea4384ba

View File

@@ -1753,8 +1753,9 @@ bool checkMaxBetweenExclusive(Node *n, int begin, int end,
}
// Check inner pages
bool result = true;
for (int i = (begin >> 4) + 1; i < (end - 1) >> 4; ++i) {
result &= self->maxOfMax[i] <= readVersion;
for (int i = 0; i < 16; ++i) {
result &= !((self->maxOfMax[i] > readVersion) & ((begin >> 4) + 1 <= i) &
(i < ((end - 1) >> 4)));
}
return result;
}