in reply to Code Optimization
and the code I have written for it is very slow.
Doesn't look that way to me :)
Well for the test I set the permutations to 2, where I actually need millions of permutations.