accelerating permuteData