On Wed, 2005-11-23 at 11:57 -0500, Federico Lucifredi wrote: > Which is a much better name for it. Anyhow, looking at the actual issue > at hand - the module. In my explorations of it, I have found that it > leves a bit to be desired in terms of performance -- generating the 65k > striungs possible in the (a b c d) alphabeth takes 10 minutes, > generating the 1'000'000 strings possible in ( a b c d e) takes 9 hours. > Obviously, something is going on.
CORRECTION: the alphabet used was (0 1 2 3 4 5 6 7 8 9 a b c d e f) in the numbers above, and the loops did include substrings (that is, generating length 4 I would also generate lengths 3 2 and 1), which means the actual total of generated strings is higher than the charset^picks numbers I mentioned in the quote. the new code yields the 65k 4-length strings in (0 1.. e f) in 1.2 seconds and the 1'000'000 5-length ones over the same alphabet in 20.3 sec-- not bad as a speedup over Math::Combinatorics -- then again, I am not generating substrings as I was in the old case. -f _______________________________________________ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm