Holy Grailsort: Prototyping a New Buffer Redistribution
Вставка
- Опубліковано 29 січ 2022
- Presenting the rough draft of a much faster final merge dubbed "split merging", created by our team member Control!
Follow our project here: github.com/HolyGrailSortProje...
Visit our community Discord: / discord
Check out the NEW home for ArrayV here: github.com/gaming32/ArrayV-v4.0
Check out the Mother 1+2 Restoration project: / discord
Thank you to Kalmar Republic and The Marshal Star for supporting my videos!
Join this channel to get access to perks:
/ @musicombo - Наука та технологія
Visit our community Discord: discord.gg/thestudio
Check out the NEW home for ArrayV here: github.com/gaming32/ArrayV-v4.0
your vids always help me calm down whenever im stressed, even though its not the intention i still wanna say thank you :)
You are more than welcome!! ❤
i didn't come here understanding what the holy grail sort was, but i was enchanted by it anyways. it's weird how this makes "sense" to you as you watch it and see the computer's thoughts translated to GUI.
ohhh
ohhh that's a good one
that's a good one
yeah, no i see it
Is this still stable? I see shellsort.
well spotted!
Shellsort is used during the algorithm to sort the buffer. This buffer is collected at the start and is made up entirely of unique values.
The buffer is used as a work area and the algorithm doesn't have to maintain stability inside the buffer (since it's all unique values).
Shellsort was choosen for this since it works well on small arrays and the buffer is size O(sqrt(n)) (small in comparison to the array length)
There are also fallbacks in case the algorithm doesn't find enough unique values, see ~ 3:00 for that.
In those cases it switches to a block selection with less unique values and then a lazy merge (which is a relatively fast inplace merge that works better if there are less unique values).
@@LordControl as i see, the buffer is completely in-place (it's in the main array) and at the end, it will be sorted back into the whole main array. how could that be stable if the buffer itself is "unstable"?
@@RedstoneNguyen The buffer is made up of unique items meaning that you don't have to worry about the stability of them (no two items in the buffer are the same), that is why you don't have to maintain stability, you can always recover the original order.
@@jeremy.N oh my bad, i missed what is unique 😅
I just thought of an idea for a sort, i don’t know if it will work: basically you put all the elements in a poplar heap and then use merge sort
I’ll be honest, I don’t really like those sounds. I don’t know what it is, but I much rather prefer the old sounds than this.
Fair enough! They are customizable with ArrayV version 4!
@@Musicombo I’m glad they are, but if you like them the way they are right now, that’s perfectly fine.
I like either rock organ sample for my videos.