-
Notifications
You must be signed in to change notification settings - Fork 323
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
EnsoMultiValue.firstDispatch
to speed benchmarks up
#11975
base: develop
Are you sure you want to change the base?
Conversation
…nsoMultiValue instance
return newNode.newValue(copyTypes, 1, mv.values); | ||
} else { | ||
copyTypes = copyTypes.clone(); | ||
var copyValues = mv.values.clone(); |
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.
The idea behind this PR's speed up is to avoid mv.values.clone()
when we only need to select new single pivot value. Instead we give each EnsoMultiValue
a firstDispatch
index into the array that identifies the location of the currently selected type. Then ths reorderOnly
operation can share the same mv.values
array with the new EnsoMultiValue
.
Pull Request Description
Even better fix for #11846. Avoids cloning of array in
reorderOnly
situation. To speed execution up.Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Java,