Live data from Hacker News

JesseSort: A novel sorting algorithm that is faster than Python's default sort.

github.com

1–10 of 65 posts

Re: JesseSort: A novel sorting algorithm that is faster than Python's default sort.

#2
So for those of us who aren’t hanging on every update in the Python universe, what is the default sort in Python now? All I recall is that Timsort got dethroned and the author seems to be behaving like it’s some big secret to be kept from the plebs.

Edit: all the way at the bottom of page 6: timsort+powersort

Re: JesseSort: A novel sorting algorithm that is faster than Python's default sort.

#4
post #2

So for those of us who aren’t hanging on every update in the Python universe, what is the default sort in Python now? All I recall is that Timsort got dethroned and the author seems to be behaving like it’s some big secret to be kept from the plebs. Edit: all the way at the bottom of page 6: timsort+powersort

Powersort is pretty neat, here's a blog post with links to talks about it by one of the authors:

https://www.wild-inter.net/posts/powersort-in-python-3.11

Re: JesseSort: A novel sorting algorithm that is faster than Python's default sort.

#5
Interesting approach, although I'm wondering why they didn't just use a double-ended queue instead of a linked list.

Also, I get the urge to name the algorithm after yourself, since Timsort is named after its creator as well, but if you call you data structure "rainbow" then my first association would be the rainbow flag, since flag-sorts also have a tradition in sorting algorithm names.

[0] https://en.m.wikipedia.org/wiki/Dutch_national_flag_problem

[1] https://en.m.wikipedia.org/wiki/American_flag_sort

Re: JesseSort: A novel sorting algorithm that is faster than Python's default sort.

#6
so, I had ChatGPT give me a quick run through, after feeding it the JesseSort python file, here's how it understood the algorithm in simple terms:

1. It starts with two elements and places them in order. 2. Each new element is inserted into the correct position within the growing "rainbow" of sorted bands. 3. By the time all elements are inserted, the list consists of multiple sorted bands that are then merged.

Was it wrong?

Re: JesseSort: A novel sorting algorithm that is faster than Python's default sort.

#8

so, I had ChatGPT give me a quick run through, after feeding it the JesseSort python file, here's how it understood the algorithm in simple terms: 1. It starts with two elements and places them in order. 2. Each new element is inserted into the correct position within the growing "rainbow" of sorted bands. 3. By the time all elements are inserted, the list consists of multiple sorted bands that are then merged. Was i…

Pdf mentions split rainbows

Re: JesseSort: A novel sorting algorithm that is faster than Python's default sort.

#9

Interesting approach, although I'm wondering why they didn't just use a double-ended queue instead of a linked list. Also, I get the urge to name the algorithm after yourself, since Timsort is named after its creator as well, but if you call you data structure "rainbow" then my first association would be the rainbow flag, since flag-sorts also have a tradition in sorting algorithm names. [0] https://en.m.wikipedia.or…

a double-ended queue is often implemented using a doubly linked list (like the one in use here)

if you back it by two arrays then you can't do O(1) inserts in the middle (like is going on here)

Re: JesseSort: A novel sorting algorithm that is faster than Python's default sort.

#10

Interesting approach, although I'm wondering why they didn't just use a double-ended queue instead of a linked list. Also, I get the urge to name the algorithm after yourself, since Timsort is named after its creator as well, but if you call you data structure "rainbow" then my first association would be the rainbow flag, since flag-sorts also have a tradition in sorting algorithm names. [0] https://en.m.wikipedia.or…

First thing I think about with "rainbow" and "data structures" is rainbow tables.
Post reply on HN