Lennart wrote
Well, I'm a sucker for a benchmark so I ran all of these with hbc.
I also added the smooth merge sort that comes with hbc.
...
As you can see there is no clear winner, but I see no real reason
to change the sort that comes with hbc to something else at this
moment.
You are
--167E2781446B
Content-Type: text/plain; charset="us-ascii"
Ralf Hinze wrote:
Practitioners are probably surprised to learn that `pairingSort' is the
algorithm of choice for sorting. Any objections to this recommendation?
I was surprised to see that it performs so well: sorting
Sorting is a hobby-horse of mine, so I cannot resist the temptation to
elaborate on the subject. I was motivated to write this rather long
reply by Carsten Kehler Holst saying `As far as I can see the
difference between merge sort and heap sort as described by Jon is
almost non existing'. Carsten
On 4 Oct , Chris Okasaki wrote:
But the heapsort you give is nothing like the standard imperative
heapsort!
Point taken, although I think 'nothing like' is overstating the case.
Yes, it uses a heap, but not the binary heap used by standard
heapsort.
Perfectly true. I only said that you
On 2 Oct , Carsten Kehler Holst wrote:
Merge Sort vs. Heap Sort (ala Jon)
As far as I can see the difference between merge sort and heap sort as
described by Jon is almost non existing.
I'm afraid you need to look a little harder :-)
At first let me note that heapsort as I sent
[EMAIL PROTECTED] wrote:
Here is my version:
[...]
On 21 Sep , Chris Dornan wrote:
When would a heap sort be preferable to a merge sort?
a) When you want to explain the imperative heapsort
But the heapsort you give is nothing like the standard imperative
heapsort! Yes, it uses a heap
Merge Sort vs. Heap Sort (ala Jon)
As far as I can see the difference between merge sort and heap sort as
described by Jon is almost non existing.
Merge sort as I wrote it in 92 (it might have been 93 :-).
Using Jon's naming:
runify x = [x]
merge [] ys = ys
merge xs [] = xs
merge xrun@(x:xs
On 19 Sep, Nicholas Bleakly wrote:
Does any body have a heap sort algorithm (i.e. takes a single unsorted
list and applies a heap sort to it)?
If you mean a functional one, I have. I could email it to you. Or
post it here if wanted. Does anyone else have one?
--
Jon Fairbairn
Does any body have a heap sort algorithm (i.e. takes a single unsorted
list and applies a heap sort to it)?
Thanks
--
Nicholas Bleakly
[EMAIL PROTECTED]
[EMAIL PROTECTED]
LINUX! The choice of a GNU generation.