Anonymous user
Sorting algorithms/Quicksort: Difference between revisions
→benchmarking
(Added Chipmunk Basic) |
imported>Rcmlz |
||
Line 8,393:
parallel-medium-batch => { quicksort-parallel(@unsorted, $m-batch) },
parallel-large-batch => { quicksort-parallel(@unsorted, $l-batch) },
}, :statistics;
};▼
my @metrics = <mean median sd>;
for %results.kv -> $name, ($start, $end, $diff, $avg) {▼
my $msg-row = "%.4f\t" x @metrics.elems ~ '%s';
}</syntaxhighlight>▼
say @metrics.join("\t");
say sprintf($msg-row, %m{@metrics}, $name);
<pre>
xxxxxxxxxxx Benchmarking xxxxxxxxxxx
elements: 40960, runs: 5, cpu-cores: 4, large/medium/small/tiny-batch: 8192/2048/512/128
mean median sd
2.9503 2.8907 0.2071 parallel-small-batch
3.2054 3.1727 0.2078 parallel-tiny-batch
5.6524 5.0980 1.2628 parallel-naive
3.4717 3.3353 0.3622 parallel-medium-batch
4.6275 4.7793 0.4930 parallel-large-batch
6.5401 6.2832 0.5585 single-thread
</pre>
|