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

Add fast case (no-op case) for into_dimensionality and into_dyn #906

Merged
merged 3 commits into from
Feb 3, 2021

Conversation

bluss
Copy link
Member

@bluss bluss commented Feb 2, 2021

This adds a no-cloning or no-allocation case for IxDyn to IxDyn in this method; there is no change to other conversions - they were already good, benchmarks show.

into_dyn was improved for the dyn -> dyn case by just adding a missing special case IxDyn::into_dyn method.

Fixes #905

This case has most impact for IxDyn, the benchmark for const dims is
unchanged (it was already fast).
This method was simply not special cased for `IxDyn`.
@bluss bluss changed the title Add fast case (no-op case) for into_dimensionality Add fast case (no-op case) for into_dimensionality and into_dyn Feb 3, 2021
@bluss bluss merged commit 480f45b into master Feb 3, 2021
@bluss bluss deleted the faster-into-dimensionality branch February 3, 2021 11:20
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.

Add fast path to into_dimensionality
1 participant