Open
Description
when calling DescendRange methods, an iteration is performed.
All items between [lessOrEqual, greaterThan ) are iterated.
Suppose there're n items in the range, I though Less function is called log(n) times.
However, Less is called more than n times as a matter of
if stop != nil && !n.items[i].Less(stop) {
return hit, false
}
Why make comparisons this way? I though if parent node can decide all its children are in the range, most Less(stop) call can be optimized out.
Are there anything wrong with this idea?
Metadata
Metadata
Assignees
Labels
No labels