Sorting algorithms/Quicksort: Difference between revisions
Content added Content deleted
imported>Rcmlz |
imported>Rcmlz |
||
Line 8,244: | Line 8,244: | ||
<syntaxhighlight lang="raku" line> |
<syntaxhighlight lang="raku" line> |
||
#|« Recursive, concurrent quicksort implementation |
#|« Recursive, concurrent quicksort implementation |
||
* in partitioning/classifying step by .race or .hyper |
* in partitioning/classifying step by .race or .hyper -> using default batch=64 and degree=4 |
||
* in recursion step on Less partition by start {} |
* in recursion step on Less partition by start {} -> unlimited number of new threads created |
||
» |
» |
||
sub quicksort-recursive- |
sub quicksort-recursive-concurrent(@input) { |
||
return @input if @input.elems < 2; |
return @input if @input.elems < 2; |
||
my $pivot = @input.pick; |
my $pivot = @input.pick; |