8000 Add fast case (no-op case) for into_dimensionality and into_dyn by bluss · Pull Request #906 · rust-ndarray/ndarray · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
bluss merged 3 commits intomasterfrom
faster-into-dimensionality
Feb 3, 2021
Merged

Add fast case (no-op case) for into_dimensionality and into_dyn#906
bluss merged 3 commits intomasterfrom
faster-into-dimensionality

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

bluss added 3 commits February 3, 2021 10:33
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 force-pushed the faster-into-dimensionality branch from ef115c6 to 83cf00d Compare February 3, 2021 09:34
@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

0