Closed FlareFlo closed 5 months ago
Unless the lexicographic order of the permutations is important for you, the permutohedron crate should plainly satify you (created by bluss who first wrote itertools). It should even be faster than a const-generics version of our permutations, due to the algorithm.
Now, some context... Right now, our MSRV is 1.43.1 while const-generics require 1.51.0. We will move to it in a near future though. But core::array::from_fn
requires 1.63.0 and core::array::try_from_fn
is still nightly, same for Iterator::next_chunk
. So we are missing some helpful bricks at the moment.
This will eventually be done along with combinations & Co. but not immediately. #560 would be a more intermediary step.
Attention: Patch coverage is 0%
with 97 lines
in your changes are missing coverage. Please review.
Project coverage is 93.23%. Comparing base (
6814180
) to head (80fc48d
). Report is 99 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
src/permutations_const.rs | 0.00% | 90 Missing :warning: |
src/lib.rs | 0.00% | 7 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Unless the lexicographic order of the permutations is important for you, the permutohedron crate should plainly satify you (created by bluss who first wrote itertools). It should even be faster than a const-generics version of our permutations, due to the algorithm.
Now, some context... Right now, our MSRV is 1.43.1 while const-generics require 1.51.0. We will move to it in a near future though. But
core::array::from_fn
requires 1.63.0 andcore::array::try_from_fn
is still nightly, same forIterator::next_chunk
. So we are missing some helpful bricks at the moment.This will eventually be done along with combinations & Co. but not immediately. #560 would be a more intermediary step.
permutohedron covers my case, thanks!
Seeing that the MSRV is restricted like that, should I close this?
If you want to revisit this when a more appriopriate time come then we can re-open it.
In an application of mine i use a fixed size of permutations, which would cut down on some very wasteful temporary allocations. Therefore I am proposing a const-generic counterpart to the regular permutations.
This drafts purpose is to get some initial feedback on the idea. Do not expect feature completeness or sanity, it is 3AM. Though I do intend to properly implement this if interest exists.