We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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?
The text was updated successfully, but these errors were encountered:
@caterchong I have submitted a PR base on your idea.
Sorry, something went wrong.
No branches or pull requests
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
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?
The text was updated successfully, but these errors were encountered: