A C++ Quicksort Faster Than std::sort
0 comments · c, c++, performance
- Comments2
0 comments · c, c++, performance
Story details from Lobsters ↗ · linked article on tiki.li.
A C++ Quicksort Faster Than std::sort was first seen on Lobsters · Hottest on Nov 9, 2026. Since then it has appeared in 63 checks on 2 different days. Its best position was #5 of 25, reached on Nov 9, 19:21 UTC. It dropped off the list after Nov 10, 20:21 UTC.
Position on Lobsters · Hottest at every check (lower is better).
Best rank per day (UTC).
Platform metric as reported by Lobsters.
A few top-level comments from Lobsters, shortened. Read the full thread on Lobsters.
Branchless implementations are so hard to reason about. Sometimes they are faster, sometimes they are slower, sometimes they are faster but your benchmark isn't random enough and the branch predictor makes the branchy implementation look like a winner, begging the question how random your real world data is. Like I…
You're right. When the data is nearly sorted, the advantage of branchless partitioning is much smaller. In this case, a simple Lomuto quicksort using the middle element as the pivot is very fast.
Archived daily, weekly and monthly lists that include this entry.
Not at the moment. It was last on the list on Nov 10, 20:21 UTC, after 2 days of trending.
#5 on Lobsters · Hottest, on Nov 9, 19:21 UTC. Trendoday checks this list every 30 minutes.
It was first seen on Nov 9, 2026 and has been on the list on 2 days (63 checks) since.