public override int CompareBottom(int doc)
{
// TODO: there are sneaky non-branch ways to compute
// -1/+1/0 sign
// Cannot return bottom - values[slot2] because that
// may overflow
int v2 = currentReaderValues[doc];
if (bottom > v2)
{
return 1;
}
else if (bottom < v2)
{
return - 1;
}
else
{
return 0;
}
}