22 Dec 19:28
Re: Add 'subsequences' and 'permutations' to Data.List (ticket #1990)
Yitzchak Gale <gale <at> sefer.org>
2007-12-22 18:28:17 GMT
2007-12-22 18:28:17 GMT
Twan van Laarhoven wrote: > permutations7': 4.750 sec > permutations7', using 3 for recursion: 4.250 sec > permutations8: 3.984 sec > permutations8b: 2.250 sec > permutations8b, using 3 for recursion: 1.984 sec Great work! > My current preference is 8 or 8b, using a different function in the > recursion is going to far for my taste. Perhaps they could be combined somehow, e.g., re-use interleave. You should run your times with a control that just adds up 10! copies of [1..10]. On my machine, that takes about 1 sec. So when we subtract out the control, satisfying the consistency property increases run time by at least a factor of 4. The property is nice, but is it worth that penalty? I'm not sure, I'd be interested in hearing other people's opinions. Regards, Yitz
RSS Feed