Permutations: Difference between revisions

m
→‎alternative: removed comparison to perl ntheory. 1.7s for n= 10 is by far slower, but a matter of data
m (→‎alternative: removed comparison to perl ntheory. 1.7s for n= 10 is by far slower, but a matter of data)
Line 3,024:
===alternative===
a little bit more speed.I take n = 12.
The above version takes more than 5 secs.My permlex takes 2.8s, but in the depth of my harddisk I found a version, creating all permutations using k places out of n.The cpu loves it! 1.33 s. Near to Perl ntheory
But you have to use the integers [1..n] directly or as Index to your data.
<lang pascal>{$IFDEF FPC}
{$MODE DELPHI}
Line 3,101:
//PermKoutOfN(12,12);
<pre>
479001600 //= 12!
00:00:01.328</pre>
 
Anonymous user