Create distributed quick sort algorithm#3100
Create distributed quick sort algorithm#3100zhe-thoughts wants to merge 2 commits intoTheAlgorithms:masterfrom
Conversation
This algorithm extends from quick_sort.py in this same directory. It uses Ray to make quick sort execute in distributed manner. On my local machine, it has 3x speedup: Sequential execution: 16.010289192199707 Distributed execution: 5.844448089599609
|
NOTE: this algorithm extends from the existing quick_sort.py in the same directory. Please let me know how we usually handles this (should I import it? seems an overkill since the code is very simple) |
Travis tests have failedHey @zhe-thoughts, TravisBuddy Request Identifier: 54c59f00-09ff-11eb-b8c5-47e0b209ea74 |
|
I gave this a try... all looks good but the WARNINGS are annoying and it will be good to limit the concurrency via an API or config call: ubuntu@seelam-ansible-host:~$ python quicksort.py In your case, since you are using the regular quick sort for <200K elements and total elements are 1M, only ~10 actors. When I changed the 200k to 20k, the distributed version took 4x longer than sequential version: I guess it is important to figure out at what granularity of computation, you need to use the distributed version. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Please reopen this pull request once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions! |
This algorithm extends from quick_sort.py in this same directory. It uses Ray to make quick sort execute in distributed manner.
On my local machine, it has 3x speedup:
Sequential execution: 16.010289192199707
Distributed execution: 5.844448089599609
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}.