Re: A Fast sorting algorithm for almost sorted data



Ben Rudiak-Gould <br276deleteme@xxxxxxxxx> writes:
Phil Carmody wrote:
moogie <budgetanime@xxxxxxxxxxxxxx> writes:
I would love to use better sorting algorithms. can you give me a good
search string to try in google?
Just get TAoCP. As I said before, Knuth's the man.

I don't think TAOCP describes introsort (C++'s std::sort), which is
probably the best comparison-based sorting algorithm for most
applications.

Knuth points the reader to Bentley&McIlroy. I've never seen
an input that that wasn't fast on, so never saw the need for
introsort. Most of the problems with quicksort going haywire
are pivot selection, and a 9-pseudomedian prevents anything
too wild happening (though is wasteful for small vectors, so
fall back to a 3-median).

Phil
--
"Home taping is killing big business profits. We left this side blank
so you can help." -- Dead Kennedys, written upon the B-side of tapes of
/In God We Trust, Inc./.
.



Relevant Pages

  • Re: A Fast sorting algorithm for almost sorted data
    ... search string to try in google? ... Just get TAoCP. ... the best comparison-based sorting algorithm for most applications. ...
    (comp.compression)
  • Re: Computing big numbers
    ... >> Knuth is not god and frankly I doubt Knuth thinks he's the only ... >> authority on computer science related subjects. ... TAOCP is a good series. ... I didn't say certification is bad, I said it's not a sign of good. ...
    (sci.crypt)
  • Re: concrete mathematics
    ... beats KNUTH, the DON. ... "prerequisite" for TAOCP in any sense of the word. ... about "math math" anyway, without applications to programming. ...
    (comp.programming)
  • Re: rotation by 90 in only one buffer
    ... >I suspect transposition within a single buffer was solved by someone, ... It's mentioned in Knuth (TAOCP). ...
    (comp.graphics.algorithms)
  • Re: Binary trees
    ... Eric Sosman wrote: ... one example of a balanced binary tree ... from Knuth, TAOCP 2.3.3 equation 3) ...
    (comp.lang.c)