From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Quick Sort in Rosetta Code Date: Wed, 10 Feb 2016 14:39:51 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <2e3f8f3d-9247-4294-9ee7-961547674bc3@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Wed, 10 Feb 2016 21:36:59 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="caa759af2a9c666aec02942f6fe5abd6"; logging-data="30680"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19r+LFT5OyRPx7Yi8SLQLj7cIq+vFozaOc=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: X-Mozilla-News-Host: news://freenews.netfront.net Cancel-Lock: sha1:Q5RQFBc804y4D7MBvzbWY8ECDXM= Xref: news.eternal-september.org comp.lang.ada:29485 Date: 2016-02-10T14:39:51-07:00 List-Id: 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