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

use clone_from in sort benchmarks #1131

Merged
merged 3 commits into from Feb 13, 2024
Merged

Conversation

TheIronBorn
Copy link
Contributor

No description provided.

@cuviper
Copy link
Member

cuviper commented Feb 13, 2024

Sounds good -- can you do the same in the merge-sort bench?

@TheIronBorn
Copy link
Contributor Author

Done, also allocated before timing starts

@cuviper
Copy link
Member

cuviper commented Feb 13, 2024

Thanks!

@cuviper cuviper added this pull request to the merge queue Feb 13, 2024
Merged via the queue into rayon-rs:main with commit 0b83185 Feb 13, 2024
4 checks passed
@TheIronBorn TheIronBorn changed the title use clone_from in quicksort bench use clone_from in sort benchmarks Feb 13, 2024
@TheIronBorn
Copy link
Contributor Author

I suppose the first iteration might elide the memcpy. If anyone can suggest a way to avoid that please do.

@cuviper
Copy link
Member

cuviper commented Feb 13, 2024

I doubt it will do that, but we could replace that outer clone with just Vec::with_capacity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants