I feel a bit indebted to write the results of a benchmark I made to find out which of the permutation generators are fast, Algorithm::Permute , tye's implementation , dragonchild's implementation and of course my Steinhaus Johnson Trotter XS implementation: