I have searched the internet in great detail and found many samples of PHP scripts that are addressing permutations. All these scripts are ok for permuting a few numbers and a few words here and there but when we get to perform some heavy stuff I can't execute the code.
Here is the essence of the thing we need and things I did.
I have to find all unique combinations of a range of numbers from 1 to 8. I do this easily,, no problems there...
Then I have to permute each combination which should result with a crazy number results,, and then I have to perform string replacements on each result...
I know this is intense,,, and I do manage to get it done with numbers up to 6.
6 Executes pretty slow,, and 7 and 8 simply mess with the memory allocation on the machine.
My primary question is
Is there a way I can do permutations super fast? Preferably without affecting memory too badly... AND how fast can in PHP realistically a few million records be displayed (doing it in command line,,, browser doesn't matter here)