a (supposedely) efficient implementation of a large permutation