diff options
| author | Thomas Backman <serenity@exscape.org> | 2014-06-03 16:11:47 +0200 |
|---|---|---|
| committer | Thomas Backman <serenity@exscape.org> | 2014-06-03 16:11:47 +0200 |
| commit | 3b5d6fd25486b29a70adfda6cb917ced614bc6d2 (patch) | |
| tree | a0ddcc7a971f62d52d07bad9170eec327714fcb5 /src/test/codegen/stack-alloc-string-slice.cc | |
| parent | 918dbfea60e84868537a1951ad38a782502d39c2 (diff) | |
| download | rust-3b5d6fd25486b29a70adfda6cb917ced614bc6d2.tar.gz rust-3b5d6fd25486b29a70adfda6cb917ced614bc6d2.zip | |
Add next_permutation and prev_permutation onto MutableOrdVector<T>.
Unlike ImmutableClonableVector::permutations() which returns an iterator, cloning the entire array each iteration, these methods mutate the vector in-place. For that reason, these methods are much faster; between 35-55 times faster, depending on the benchmark. They also generate permutations in lexicographical order.
Diffstat (limited to 'src/test/codegen/stack-alloc-string-slice.cc')
0 files changed, 0 insertions, 0 deletions
