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 30 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 and others added 27 commits December 19, 2024 08:39
@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 requested a review from 4e6 as a code owner January 5, 2025 05:44
@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.

@JaroslavTulach JaroslavTulach added the CI: Keep up to date Automatically update this PR to the latest develop. label Jan 7, 2025
@JaroslavTulach JaroslavTulach added CI: Clean build required CI runners will be cleaned before and after this PR is built. and removed CI: Keep up to date Automatically update this PR to the latest develop. labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Clean build required CI runners will be cleaned before and after this PR is built. 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