Sorting algorithms/Quicksort: Difference between revisions
Content added Content deleted
imported>Rcmlz |
imported>Rcmlz |
||
Line 8,321: | Line 8,321: | ||
<syntaxhighlight lang="raku" line> |
<syntaxhighlight lang="raku" line> |
||
## run benchmark on the two versions |
|||
my $elem-length = 8; |
my $elem-length = 8; |
||
my @large of Str = ('a'..'z').roll($elem-length).join xx 10 * $worker * $BATCH-SIZE; |
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."; |
say "Benchmarking by sorting {@large.elems} strings of size $elem-length - using batches of $BATCH-SIZE strings and $worker workers."; |
||
my @ |
my @benchmark = gather for @implementations -> &fun { |
||
⚫ | |||
for @implementations -> &fun { |
|||
⚫ | |||
⚫ | |||
} |
|||
⚫ | |||
say @benchmark; |
|||
} |
|||
say @becnhmark; |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
<pre> |
<pre> |