I still get incorrect results:
my @list1 = qw(2 3 5 7 11 13 17 19 23 29); my @list2 = qw(1 1 2 3 5 8 13 21 34 55 89); __DATA__ 3 4 4 4 5 6 6 8 8 11 12 14 6 6 7 8 10 13 16 18 18 20 24 8 8 9 10 12 15 20 24 26 28 30 12 12 13 14 16 19 24 32 37 39 41 14 14 15 16 18 21 26 34 45 47 58 18 18 19 20 22 25 30 38 51 60 62 20 20 21 22 24 27 32 40 53 66 68 24 24 25 26 28 31 36 44 57 72 74 30 30 31 32 34 37 42 50 63 78 84 92 94 96 100 102 106 108 112 118
If IO is a bottle neck, then a method that can reduce calls to IO is a better method
Actually, unless I am measuring algorithms that reduce IO, I avoid doing IO in my Benchmark all together. After verifying that all options produce correct results on a sufficiently varied data set, I remove all print statements. It would be interesting to see what the bench results are with a corrected algorithm where no solution did IO.
Cheers - L~R
In reply to Re^4: Challenge: Sorting Sums Of Sorted Series
by Limbic~Region
in thread Challenge: Sorting Sums Of Sorted Series
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |