public
Last active

Benchmarks for the p5 solution

  • Download Gist
benchmark.md
Markdown

colomon

10  N      1.28
10  Y      1.22
20  N      2.43
20  Y      2.54
40  N      5.94
40  Y      6.04
80  N     17.08
80  Y     17.41
160 N     50.86
160 Y     57.87
320 N    280.08
320 Y    510.05

10  Y    1.66
10  N    1.15
20  Y    2.52
20  N    2.76
40  Y    5.77
40  N    6.42
80  Y   18.21
80  N   19.47
160 Y   54.65
160 N   64.02
320 Y   343.29
320 N   725.32

fox

10  N      0.32
10  Y      0.82
20  N      0.95
20  Y      1.02
40  N      3.46
40  Y      4.39
80  N     20.65
80  Y     16.51
160 N     90.67
160 Y    108.81
320 N    903.63
320 -    took too long

10  Y      0.57
10  N      0.33
20  Y      1.18
20  N      1.00
40  Y      3.68
40  N      4.11
80  Y     18.99
80  N     17.81
160 Y     92.93
160 N    129.16
320 Y    986.74
320 -    segmentation fault

matthias

10  N      0.37
10  Y      0.33
20  N      0.59
20  Y      0.98
40  N      0.98
40  Y      2.17
80  N      2.07
80  Y      3.12
160 N      4.22
160 Y      6.15
320 N     10.51
320 Y     14.85

10  Y      0.40
10  N      0.31
20  Y      0.94
20  N      0.48
40  Y      1.85
40  N      0.94
80  Y      3.01
80  N      2.02
160 Y      5.53
160 N      4.18
320 Y     13.80
320 N      9.57

moritz

10  N      0.50
10  Y      0.42
20  N      1.08
20  Y      1.20
40  N      4.14
40  Y      4.44
80  N     16.73
80  Y     17.07
160 N     72.38
160 Y     75.76
320 N    350.05
320 Y    390.03

10  Y      0.57
10  N      0.44
20  Y      1.20
20  N      1.38
40  Y      4.45
40  N      4.60
80  Y     20.27
80  N     18.97
160 Y     83.23
160 N     80.83
320 Y    352.97
320 N    423.50

util

10  N      1.25
10  Y      1.17
20  N      3.90
20  Y      4.12
40  N     18.94
40  Y     19.03
80  N     83.02
80  Y    103.16
160 N    492.59
160 Y    717.94
320 -    took too long
320 -    took too long

10  Y      1.10
10  N      1.06
20  Y      3.87
20  N      4.04
40  Y     16.42
40  N     19.11
80  Y     86.38
80  N     97.20
160 Y    558.75
160 N    718.56
320 -    took too long
320 -    took too long
generate-data.pl
Perl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
use v6;
 
for 10, 20, 40, 80, 160, 320 -> $n {
my $a = <0 1 2 3 4>.roll($n).join;
my $b = <5 6 7 8 9>.roll($n).join;
 
say $a;
say $b;
say 'N';
say '';
 
my $ra = (0..$n - 10).pick;
my $rb = (0..$n - 10).pick;
$a = $a.substr(0, $ra) ~ 'flirtation' ~ $a.substr($ra + 10);
$b = $b.substr(0, $rb) ~ 'flirtation' ~ $b.substr($rb + 10);
 
say $a;
say $b;
say 'Y';
say '';
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.