News for hackers. Stuff that matters.
Re:Fast incremental sort by amelius on Sunday April 24, 2016 @12:48PM (#11560312)
> I wouldn't be surprised if the method in the article is faster

If that is true, then I suspect we can toss RB trees out of the window. When searching for a key inside a sorted collection, you could use binary search of complexity O(log N), which is the same complexity as searching in an RB tree. So if incremental sorting is faster than updating an RB tree, we wouldn't really need RB trees.

Of course there could be special circumstances that change this (for example large batches of inserts).

Re:Fast incremental sort by Scea91 on Sunday April 24, 2016 @12:59PM (#11560381)
I wrote it mainly not to be so dismissive about the article because I haven't read it that carefully.

With that said trees are also build to support fast deletion so that is one extra requirement that is not needed for incremental sort, maybe opening a potential possibility for some speedup.