Speed up permutations without hashing.