fast multithread permutation