Article View: rec.games.programmer
Article #1498Re: Advice needed for fastest sort algorthm
From: Warwick Allison
Date: Mon, 16 Nov 1992 02:37
Date: Mon, 16 Nov 1992 02:37
29 lines
1690 bytes
1690 bytes
dank@calvin.usc.edu (Dan King) writes:
>Quoting from The Art of Computer Programming, Volume 3 (pp176-178):
>"[r]adix sorting is usually more efficient than any other known
>sorting method for internal sorting."
Is that the first edition (1968), or second edition (1973).
I hope the references haven't dated too much :-).
Seriously, it's these exact statement that I'm arguing against. Saying that ANY
algorithm for sorting is the best, or "usually more efficient than any other" is
simply crazy. Each algorithm has strengths and weaknesses. Radix sort isn't
even APPLICABLE in most cases.
>Speaking about his example program, Knuth says,
>"A p-pass version of the program would take (11p-1)N+O(pM) units of
>time." [p is the number of keys and M is the number of radix piles]
ie. if p is too large, forget it. too large = O(N)... or even O(sqrt(N)).
(where N is the EXPECTED number of items for sorting)
--
Warwick
--
_-_|\ warwick@cs.uq.oz.au /Disclaimer:
/ * <-- Computer Science Department, /
\_.-._/ University of Queensland, / C references are NULL && void*
v Brisbane, Australia. /
Technical Details
Message-ID:
<11056@uqcspe.cs.uq.oz.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!uqcspe!cs.uq.oz.au!warwickReferences:
<6759@news.duke.edu> <BxD5pt.DyI@news.cso.uiuc.edu> <BxG0MC.7yK@chinet.chi.il.us> <10991@uqcspe.cs.uq.oz.au> <1drd06INNnji@calvin.usc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!uqcspe!cs.uq.oz.au!warwick From: warwick@cs.uq.oz.au (Warwick Allison) Newsgroups: rec.games.programmer Subject: Re: Advice needed for fastest sort algorthm Message-ID: <11056@uqcspe.cs.uq.oz.au> Date: 16 Nov 92 02:37:32 GMT References: <6759@news.duke.edu> <BxD5pt.DyI@news.cso.uiuc.edu> <BxG0MC.7yK@chinet.chi.il.us> <10991@uqcspe.cs.uq.oz.au> <1drd06INNnji@calvin.usc.edu> Sender: news@cs.uq.oz.au Reply-To: warwick@cs.uq.oz.au Lines: 29