Stop using unexported Base.permute!! #229
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR may increase performance in some cases and should pretty much never pose much of a regression. Perhaps more importantly, it drops a dependency on an undocumented internal method of Julia that may be removed in 1.10 because internals are not subject to SymVer.
In 1.9.0, Julia's
permute!
method got a bit more efficient. These benchmarks compare use ofpermute!
topermute!!
In the case of the usage in this package, in cases where
permute!!
is faster (small inputs or old versions of Julia) this PR may result in a minor performance regression, but never more than 33% because there are already two calls topermute!
in this spot. In cases wherepermute!!
is slower, there is not really a cap on how much of an improvement this PR can be. For large inputs on modern versions of Julia, this could easily be a 3x or more improvement because of the poor cache locality properties ofpermute!!
.(I rewrote this post with the release of 1.9.0)