HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
swenson
sort
C2020–2023
swenson / sort

sort

Sorting routine implementations in "template" C

3Distinct people
5Mentions
0Explicit recommenders
475GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Sorting routine implementations in "template" C

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year5 dated mentions

Observed mentions: 2020-01-20 13:11:21 UTC to 2023-05-07 04:43:59 UTC.

0122020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101

What Hacker News says

5 sources
Along the same lines, I use Christopher Swenson's sort.h at https://github.com/swenson/sort/ You get the choice of many sorting routines, including: Timsort (stable) Quicksort Merge sort (stable) In-place merge sort (not stable) Shellsort Binary insertion sort Heapsort Selection sort (this is really only here for comparison) Grail sort (stable) Sqrt Sort (stable, based on Grail sort, also by Andrey Astrelin).
In Qsort.h – Quicksort as a C macro (2019)
But is he right? At what point is it unethical for an ethical person to continue to work for an unethical company? When should people who work for an unethical face personal negative effects? He's not unique in this viewpoint. Quoting jwz: "As I've said before, if you work for Facebook, you should quit; it's the only morally defensible thing for you to do." > his entire software stack depends ... That sounds like the Mr. Gotcha meme: https://thenib.com/mister-gotcha/ . Again referring to jwz, his nightclub is on Facebook and Instagram because it's not economically viable to avoid them. ... Gotcha! Similarly, it's hard to avoid all software which doesn't have influence from the big tech companies. I used https://github.com/swenson/sort ('Sorting routine implementations in "template" C"), and even this little indy package has contributors f
Read the rest
rom Google Inc and the main developer worked at Google for a year. DeVault's working on a new programming language, Hare. You could view that as having the long-term unstated goal of escaping unethical companies.
In Kyoto project is moving from GitHub to Sourcehut
This article doesn't really make it clear but the merge sort discussion is specifically about glibc's implementation of qsort(). glibc's qsort() and Wine's qsort() are the only ones I know of that use merge sort to implement qsort(). Most implementations use quick sort. I recently did my own benchmarking on various qsort()s since I was trying to implement a faster one. The various BSDs and macOS qsort() are all faster than glibc at sorting integers and they don't allocate memory: https://github.com/ludocode/pottery/tree/master/examples/pot... Of course sorting is much faster if you can inline the comparator so a templated sort algorithm is always going to be faster than a function that takes a function pointer. But this does not require C++; it can be done in plain C. The templated intro_sort from Pottery (linked above) is competitive wit
Read the rest
h std::sort, as are the excellent swensort/sort templates: https://github.com/swenson/sort
In Beating Up on Qsort (2019)

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.