Article View: rec.games.programmer
Article #1071Re: Advice needed for fastest sort algorthm
From: Mark Hall
Date: Wed, 11 Nov 1992 04:35
Date: Wed, 11 Nov 1992 04:35
35 lines
2022 bytes
2022 bytes
In article <10991@uqcspe.cs.uq.oz.au> warwick@cs.uq.oz.au writes: )>A radix sort has a time complexity of O(N), which means that it )>operates in linear time on N units of data. ) )Gee, I'm sure the theoreticians would LOVE to see the algorithm, )since it has been PROVED long ago that sorting takes O(N log N) )time OPTIMALLY. You are invited to read any decent book on sorting before posting, next time. O(n logn) is optimal for arbitrary things. In some special cases, you can do better. Radix sort fits one of these special cases. )>This integer may then be )>represented as the path in a binary tree, with the higher order )>bits represented as paths near the root and the lower order bits as )>paths near the leaves. ) )Guess what? The number of bits will be of the order LOG N !!!!!! Number of bits will be log P where P is the largest integer. That doesn't have to have much to do with the number of items. (hint: sort the government debt of the top 15 debtor nations, values expressed in lire. What is N? What is P?) )Let's rename this group to rec.games.!programmer, and succumb to the )community's belief that "games programmers" aren't real programmers )at all. All the Windows programmers and DOS device driver programmers )can then cross there arms smugly and shake their heads at us non- )programmers, who can only write GAMES, saying "gee, they've discovered )SORTING"... no, "They haven't a CLUE about SORTING" as evidenced by many posts.
Technical Details
Message-ID:
<1992Nov11.043526.26732@netcom.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!news.tek.com!ogicse!decwrl!csus.edu!netcom.com!fooReferences:
<BxD5pt.DyI@news.cso.uiuc.edu> <BxG0MC.7yK@chinet.chi.il.us> <10991@uqcspe.cs.uq.oz.au>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!news.tek.com!ogicse!decwrl!csus.edu!netcom.com!foo From: foo@netcom.com (Mark Hall) Newsgroups: rec.games.programmer Subject: Re: Advice needed for fastest sort algorthm Message-ID: <1992Nov11.043526.26732@netcom.com> Date: 11 Nov 92 04:35:26 GMT Article-I.D.: netcom.1992Nov11.043526.26732 References: <BxD5pt.DyI@news.cso.uiuc.edu> <BxG0MC.7yK@chinet.chi.il.us> <10991@uqcspe.cs.uq.oz.au> Organization: Netcom - Online Communication Services (408 241-9760 guest) Lines: 35