[erlang-questions] Priority queues and Erlang

dj3vande <>
Mon Jun 15 07:02:42 CEST 2009


Somebody claiming to be John Haugeland wrote:


> > Had you written 'insertion sort', I'd have believed you.
> 
> I don't expect anyone to believe me without benchmarking.  However,
> it'd be nice also if nobody vocally disbelieved me in public without
> benchmarking.  Real performance is frequently counterintuitive.

Can you provide ANY data set for which this bubble sort:
<http://en.wikipedia.org/w/index.php?title=Bubble_sort&oldid=296207353#Pseudocode_implementation>
(or even this one:
<http://en.wikipedia.org/w/index.php?title=Bubble_sort&oldid=296207353#Alternative_implementations>)
will beat this insertion sort:
<http://en.wikipedia.org/w/index.php?title=Insertion_sort&oldid=293682800#Algorithm>?
(Hint: It has at least 9 elements.)


dave

-- 
Dave Vandervies


Plan your future!  Make God laugh!


More information about the erlang-questions mailing list