SortingAlgorithms.jl icon indicating copy to clipboard operation
SortingAlgorithms.jl copied to clipboard

ENH add an introsort implementation

Open hayd opened this issue 11 years ago • 4 comments

This is an implementation from the pseudo-code in Musser's paper.

I haven't done any performance testing, no doubt there is optimization to do here e.g. @inbounds and something better for index_of_median_of_three (which atm is terrible)...

hayd avatar Oct 25 '14 01:10 hayd

What's the advantage of introsort?

stevengj avatar Oct 27 '14 16:10 stevengj

I haven't looked at this yet, but generally, introsort uses quick sort, but keeps track of recursion depth, and if it reaches a certain depth, switches to a different algorithm with guaranteed worst case depth of O(log N).

It's a good algorithm to have available.

On Monday, October 27, 2014, Steven G. Johnson [email protected] wrote:

What's the advantage of introsort?

— Reply to this email directly or view it on GitHub https://github.com/JuliaLang/SortingAlgorithms.jl/pull/7#issuecomment-60618924 .

kmsquire avatar Oct 27 '14 16:10 kmsquire

it's been more than 5 years. close it, merge it, or start another repo

xiaodaigh avatar Oct 03 '20 05:10 xiaodaigh

There's an unresolved comment above that somebody needs to address (and also needs a rebase). (BTW, necro-posting generally isn't useful if you're not volunteering to work on PRs yourself.)

nalimilan avatar Oct 19 '20 12:10 nalimilan