Sorting algorithms/Quicksort: Difference between revisions
Content added Content deleted
imported>Rcmlz |
imported>Rcmlz |
||
Line 8,246: | Line 8,246: | ||
#|« Recursive, concurrent quicksort implementation |
#|« Recursive, concurrent quicksort implementation |
||
* in partitioning/classifying step by .race or .hyper |
* in partitioning/classifying step by .race or .hyper |
||
* in recursion step on Less partition by start {} |
* in recursion step on Less partition by start {} |
||
» |
» |
||
sub quicksort-recursive-concurrent(@input) { |
sub quicksort-recursive-concurrent(@input) { |
||
Line 8,265: | Line 8,265: | ||
* andthen passes the result of the previous block as $_ to the next block. |
* andthen passes the result of the previous block as $_ to the next block. |
||
* no need to start a new thread for More partition - as we better use current thread. |
* no need to start a new thread for More partition - as we better use current thread. |
||
* hyper/rrace using default batch=64 and degree=4 -> tune it! |
|||
* recursion on Less partition creates an unlimited number of new threads -> limit it! |
|||
» |
» |
||
</syntaxhighlight> |
</syntaxhighlight> |