HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
lewj85
jessesort
C++2025–2025
lewj85 / jessesort

jessesort

Discover this repository through its Hacker News conversations.

2Distinct people
2Mentions
0Explicit recommenders
120GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A public description has not been verified.

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, 3:56:07 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 3-hour interval2 dated mentions

Observed mentions: 2025-02-13 20:27:08 UTC to 2025-02-15 18:09:04 UTC.

012025-02-13 18:00:00 UTC to 2025-02-13 21:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsFeb 13, 18:002025-02-13 21:00:00 UTC to 2025-02-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-14 00:00:00 UTC to 2025-02-14 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-14 03:00:00 UTC to 2025-02-14 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-14 06:00:00 UTC to 2025-02-14 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-14 09:00:00 UTC to 2025-02-14 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-14 12:00:00 UTC to 2025-02-14 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-14 15:00:00 UTC to 2025-02-14 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-14 18:00:00 UTC to 2025-02-14 21:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsFeb 14, 18:002025-02-14 21:00:00 UTC to 2025-02-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-15 00:00:00 UTC to 2025-02-15 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-15 03:00:00 UTC to 2025-02-15 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-15 06:00:00 UTC to 2025-02-15 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-15 09:00:00 UTC to 2025-02-15 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-15 12:00:00 UTC to 2025-02-15 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-15 15:00:00 UTC to 2025-02-15 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-15 18:00:00 UTC to 2025-02-15 21:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsFeb 15, 18:00

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
Feb 13, 18:002025-02-13 18:00:00 UTC2025-02-13 21:00:00 UTC110
Feb 13, 21:002025-02-13 21:00:00 UTC2025-02-14 00:00:00 UTC000
Feb 14, 00:002025-02-14 00:00:00 UTC2025-02-14 03:00:00 UTC000
Feb 14, 03:002025-02-14 03:00:00 UTC2025-02-14 06:00:00 UTC000
Feb 14, 06:002025-02-14 06:00:00 UTC2025-02-14 09:00:00 UTC000
Feb 14, 09:002025-02-14 09:00:00 UTC2025-02-14 12:00:00 UTC000
Feb 14, 12:002025-02-14 12:00:00 UTC2025-02-14 15:00:00 UTC000
Feb 14, 15:002025-02-14 15:00:00 UTC2025-02-14 18:00:00 UTC000
Feb 14, 18:002025-02-14 18:00:00 UTC2025-02-14 21:00:00 UTC000
Feb 14, 21:002025-02-14 21:00:00 UTC2025-02-15 00:00:00 UTC000
Feb 15, 00:002025-02-15 00:00:00 UTC2025-02-15 03:00:00 UTC000
Feb 15, 03:002025-02-15 03:00:00 UTC2025-02-15 06:00:00 UTC000
Feb 15, 06:002025-02-15 06:00:00 UTC2025-02-15 09:00:00 UTC000
Feb 15, 09:002025-02-15 09:00:00 UTC2025-02-15 12:00:00 UTC000
Feb 15, 12:002025-02-15 12:00:00 UTC2025-02-15 15:00:00 UTC000
Feb 15, 15:002025-02-15 15:00:00 UTC2025-02-15 18:00:00 UTC000
Feb 15, 18:002025-02-15 18:00:00 UTC2025-02-15 21:00:00 UTC101

What Hacker News says

2 sources
Hmm. I understand the "rainbow" data structure depicted in the paper's Figure 2 (that particular diagram is super useful!), but I don't understand the algorithm to build a (useful) rainbow from an unsorted array. Obviously one way to build a rainbow is to sort the array and then say that the entire array is now the base array of a rainbow, but that's not algorithmically helpful. (Likewise, one can put an array into max-heap (Eytzinger) order simply by reverse-sorting it; but that's not algorithmically helpful.) So I went to just transcribe the pseudocode algorithm given in the paper, and found instructions like "if index is at the middle of the base array then...", which is pretty confusing at first glance. I believe it just means that we're also tracking the length `L` of the base array, and `if index == (L+1)/2 then...`, but it could be
Read the rest
written much more clearly. (In fact it could just say "if index equals the number of bands.") Likewise the use of the adjectives "middle-left" and "middle-right" instead of spelling out which actual indices we're talking about. Likewise, when `index` is zero I don't think "base array[index-1]" is well-defined. Seems easy to patch up; but if it's so easy then why didn't the author do it? The algorithm depends on the undefined subroutines MERGEPOLICY and MERGE. The implementation of MERGE might be considered obvious (if we are unconcerned with the memory consumption of our "band" representation, which also doesn't seem to be concretely described in the paper). MERGEPOLICY, though, is opaque to me, and seems kind of critical to the entire algorithm. The algorithm runs the opaque BINARYSEARCH step O(n) times, giving it a runtime of O(n log n) right off the bat. This git commit — https://github.com/lewj85/jessesort/commit/b98f7245077681989... — indicates that the author was initially not even aware that sorting is generally O(n log n); he originally wrote that JesseSort was "O(n log(ln n))" with some nonsense about "harmonic numbers." (Thankfully removed in that git commit, but worryingly present before. You cannot in general make a good algorithm simply by starting with a bullshit algorithm and removing the bullshit.) JesseSort seems to boil down to two steps: (1) Create a list of sorted sublists, using the paper's poorly-defined splitting algorithm. (2) Merge the bands, using the paper's undefined merging algorithm. Up to the details of those two steps it's exactly an N-way mergesort (the dynamic selection of `N` being part of the details). Without reliable concrete explanation of those details, I'm not sure how to proceed. It almost feels like the author was really excited to share this "rainbow" intermediate data structure (Figures 1 and 2) — which, again, is legitimately interesting IMHO — but when it came to motivating why one might care about it, he just kinda went "I dunno, sorting?" and wasn't really excited about fleshing out that idea beyond a sketch. P.S., I'm sure this is my C++ chauvinism showing, but I'm shocked that the Python reference implementation operates only on `int`. Surely if you know you're sorting nothing but plain old ints, faster algorithms exist! Python's default `sorted` function works on any kind of input. That probably explains a lot of the speed difference right there. Also, `jessesort` doesn't even fail loudly if you pass it non-ints; it just quietly type-casts the input. >>> from jessesort_c import jessesort >>> jessesort([1.414, 2.718]) [1, 2]
In JesseSort: A novel sorting algorithm that is faster than Python's default sort.

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.