Sorting algorithms/Quicksort: Difference between revisions

imported>Rcmlz
imported>Rcmlz
Line 8,321:
 
<syntaxhighlight lang="raku" line>
## run benchmark on the two versions
my $elem-length = 8;
my @large of Str = ('a'..'z').roll($elem-length).join xx 10 * $worker * $BATCH-SIZE;
 
say "Benchmarking by sorting {@large.elems} strings of size $elem-length - using batches of $BATCH-SIZE strings and $worker workers.";
my @becnhmarkbenchmark = gather for @implementations -> &fun {
&fun(@large);
for @implementations -> &fun {
take (&fun.name => now - ENTER now);
&fun(@large);
}
take (&fun.name => now - ENTER now);
say @benchmark;
}
say @becnhmark;
</syntaxhighlight>
<pre>
Anonymous user