You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Bruno Roustant (Jira)" <ji...@apache.org> on 2021/10/21 20:45:00 UTC
[jira] [Updated] (LUCENE-10196) Improve IntroSorter with 3-ways
partitioning
[ https://issues.apache.org/jira/browse/LUCENE-10196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bruno Roustant updated LUCENE-10196:
------------------------------------
Description:
I added a SorterBenchmark to evaluate the performance of the various Sorter implementations depending on the strategies defined in BaseSortTestCase (random, random-low-cardinality, ascending, descending, etc).
By changing the implementation of the IntroSorter to use a 3-ways partitioning, we can gain a significant performance improvement when sorting low-cardinality lists, and with additional changes we can also improve the performance for all the strategies.
Proposed changes:
- Sort small ranges with insertion sort (instead of binary sort).
- Select the quick sort pivot with medians.
- Partition with the fast Bentley-McIlroy 3-ways partitioning algorithm.
- Replace the tail recursion by a loop.
was:
I added a SorterBenchmark to evaluate the performance of the various Sorter implementations depending on the strategies defined in BaseSortTestCase (random, random-low-cardinality, ascending, descending, etc).
By changing the implementation of the IntroSorter to use a 3-ways partitioning, we can gain a significant performance improvement when sorting low-cardinality lists, and we additional changes we can also improve the performance for all the strategies.
Proposed changes:
- Sort small ranges with insertion sort (instead of binary sort).
- Select the quick sort pivot with medians.
- Partition with the fast Bentley-McIlroy 3-ways partitioning algorithm.
- Replace the tail recursion by a loop.
> Improve IntroSorter with 3-ways partitioning
> --------------------------------------------
>
> Key: LUCENE-10196
> URL: https://issues.apache.org/jira/browse/LUCENE-10196
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Bruno Roustant
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> I added a SorterBenchmark to evaluate the performance of the various Sorter implementations depending on the strategies defined in BaseSortTestCase (random, random-low-cardinality, ascending, descending, etc).
> By changing the implementation of the IntroSorter to use a 3-ways partitioning, we can gain a significant performance improvement when sorting low-cardinality lists, and with additional changes we can also improve the performance for all the strategies.
> Proposed changes:
> - Sort small ranges with insertion sort (instead of binary sort).
> - Select the quick sort pivot with medians.
> - Partition with the fast Bentley-McIlroy 3-ways partitioning algorithm.
> - Replace the tail recursion by a loop.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org