Skip to content
New issue

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

Avoid operator lookup in Range.span #15300

Conversation

findepi
Copy link
Member

@findepi findepi commented Dec 5, 2022

Follows #15281, #10239, #15268

It can be assumed that `Range` construction is more expensive than
construction of a parameterized lambda, because range constructor needs
to lookup the comparison operator.
@findepi findepi added performance no-release-notes This pull request does not require release notes entry labels Dec 5, 2022
@cla-bot cla-bot bot added the cla-signed label Dec 5, 2022
@findepi findepi requested a review from losipiuk December 5, 2022 19:17
Remove convenience constructor that takes no `comparisonOperator` and
looks it up, preventing future code from using it accidentally, where
an operator is known.
`Range` is final, so `protected` access has little sense.
The method is shared between `Range` and `SortedRangeSet`.
@findepi findepi force-pushed the findepi/avoid-operator-lookup-in-range-span-7d3e73 branch from 4ee6470 to 9c7b3c6 Compare December 5, 2022 20:42
@findepi findepi merged commit 791ecb0 into trinodb:master Dec 6, 2022
@findepi findepi deleted the findepi/avoid-operator-lookup-in-range-span-7d3e73 branch December 6, 2022 08:01
@github-actions github-actions bot added this to the 404 milestone Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed no-release-notes This pull request does not require release notes entry performance
Development

Successfully merging this pull request may close these issues.

3 participants