-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Extract meaningful methods in join operator #16468
Extract meaningful methods in join operator #16468
Conversation
JFR profiling will also be easier when code is split into more methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea + lgtm
Just for the record, it was your idea in the first place. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this have perf impact? Did JMH change?
// look for an empty slot or a slot containing this key | ||
while (keys[pos] != -1) { | ||
int currentKey = keys[pos]; | ||
if (hash == positionToHashes[currentKey] && positionEqualsPositionIgnoreNulls(currentKey, realPosition)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing cast?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hash
is now casted in method invocation, line 122
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this have perf impact? Did JMH change?
It's quite improbable, for two reasons:
- Those methods are inlined by JIT, if applicable
- Every extracted method either operates on batch of values or performs multiple random memory accesses. So the methods are not cheap and cost of invocation is negligible.
// look for an empty slot or a slot containing this key | ||
while (keys[pos] != -1) { | ||
int currentKey = keys[pos]; | ||
if (hash == positionToHashes[currentKey] && positionEqualsPositionIgnoreNulls(currentKey, realPosition)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hash
is now casted in method invocation, line 122
Description
Just a simple refactoring
Additional context and related issues
Release notes
(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: