pingcap / pingcap/tiflash

Use pdqsort and Floyd-Rivest algorithm instead of `std::sort` and `std::partial_sort`

Open
#5,690 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

component/compute type/enhancement
Dominant language
C++
Stars
1k
Forks
423
Avg merge
1d 15h
Merged PRs (30d)
24

Description

Enhancement

benchmark
https://github.com/danlark1/miniselect#performance-results

we can replace std::sort and std::partial_sort with pdqsort and Floyd-Rivest algorithm.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the call sites that use std::sort and std::partial_sort, then review the linked miniselect performance results and the proposed pdqsort and Floyd-Rivest implementations. Compare benchmark results and verify that sorting behavior remains correct; done means the replacements are integrated with measured performance improvements.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.