Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change to Hoare partitioning for list.sort
wren-lang#1141 identified two problems with the existing implementation, namely that it was very slow when presented with lists which were either already sorted or all the same. The purpose of this PR is to solve those problems by changing from Lomuto to Hoare partitioning. As shown by the figures in the above issue, this should not lead to performance degradation for small 'random' lists and may even be a little quicker for large lists. This change would be invisible to users as only private methods are affected and does not require any changes to the documentation or tests.
- Loading branch information