comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Quick Sort in Rosetta Code
Date: Wed, 10 Feb 2016 14:39:51 -0700
Date: 2016-02-10T14:39:51-07:00	[thread overview]
Message-ID: <n9gahp$tuo$1@dont-email.me> (raw)
In-Reply-To: <ffde2ed0-1a86-41c9-8fff-08a21b1c664f@googlegroups.com>

On 02/10/2016 06:50 AM, robin.vowels@gmail.com wrote:
> On Wednesday, February 10, 2016 at 4:43:11 PM UTC+11, Jeffrey R. Carter wrote:
>>
>> Not quite right. There's an implementation of Quick Sort in the PragmARCs, but
>> it would use insertion sort for something this short.
> 
> The Rosetta Quicksort is about Quicksort,
> not about Insertion Sort.

Yes, of course. A simple O(N**2) sorting algorithm is faster than Quick Sort for
short arrays, so a sorting pkg for real-world use (such as the PragmARCs) should
use such an algorithm for short arrays rather than invoke the overhead of Quick
Sort.

However, the PragmARC Quick Sort is well tested; if someone wants to take out
the test for a short array and submit it to Rosetta Code, that would be fine.

-- 
Jeff Carter
"You tiny-brained wipers of other people's bottoms!"
Monty Python & the Holy Grail
18

  reply	other threads:[~2016-02-10 21:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10  5:27 Quick Sort in Rosetta Code gautier_niouzes
2016-02-10  5:43 ` Jeffrey R. Carter
2016-02-10 13:50   ` robin.vowels
2016-02-10 21:39     ` Jeffrey R. Carter [this message]
2016-02-10  7:00 ` Leo Brewin
2016-02-10  7:14 ` Leo Brewin
2016-02-10 10:04   ` gautier_niouzes
2016-02-10 10:16   ` gautier_niouzes
2016-02-10 20:41 ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox