Re: adapting a quicksort
- From: Ron Ford <ron@xxxxxxxxxxxxxxx>
- Date: Mon, 25 Aug 2008 15:53:04 -0600
On Sat, 23 Aug 2008 20:47:51 -0700 (PDT), ttw6687@xxxxxxx posted:
The pivot is the split point. Items larger go into one set of lists
and smaller go into the other. Kunth describes in his volume on
sorting and searching.
Thanks for the tip. I've got other reasons to bike to campus, so I'll run
down Knuth there too.
Note that the above code is correct unless arithmetic bounds get
exceeded. This depends on the compiler and hardware. It's possible
that A-B.LT.0 does not imply that A.LT.B, even for integers.
It seems to work right out of the can for me. With a sort size of ten
thousand, the quicksort is three orders of magnitude faster.
Is qsort an intrinsic for C?
--
Wealth - any income that is at least one hundred dollars more a year than
the income of one's wife's sister's husband. 6
H. L. Mencken
.
- References:
- Re: adapting a quicksort
- From: Ron Ford
- Re: adapting a quicksort
- From: ttw6687
- Re: adapting a quicksort
- Prev by Date: Re: F2003 complier, how far from us?
- Next by Date: Re: J3 Responses to Public Comments
- Previous by thread: Re: adapting a quicksort
- Next by thread: No input files
- Index(es):
Relevant Pages
|