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

EnsoMultiValue.firstDispatch to speed benchmarks up #11975

Draft
wants to merge 26 commits into
base: develop
Choose a base branch
from

Conversation

JaroslavTulach
Copy link
Member

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:

@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label Jan 5, 2025
@JaroslavTulach JaroslavTulach self-assigned this Jan 5, 2025
@JaroslavTulach JaroslavTulach marked this pull request as draft January 5, 2025 05:44
return newNode.newValue(copyTypes, 1, mv.values);
} else {
copyTypes = copyTypes.clone();
var copyValues = mv.values.clone();
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant