Parallel Rogue-like benchmark
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Mon Aug 26 05:16:45 PDT 2013
On 26/08/13 14:04, Russel Winder wrote:
> OK so good for the first 20s of a lecture on Quicksort and totally
> useless for doing anything properly. Two main reasons:
>
> 1. It copies data rather than doing it in situ, should use Mergesort.
> 2. passes over the data twice instead of once.
>
> This is a perfect example of where minimizing LOC and doing the right
> thing are opposed.
If anyone hadn't already realized, my citation of this example was a joke based
on the fact that it's explicitly cited in Andrei's article "On iteration" as an
example of beautiful-looking code that is terrible in practice. Or, as he puts
it, "Emperors clad in boxers". :-)
Lisp- and Haskell-oriented friends have objected to that example as a strawman,
claiming that everyone knows that in practice you implement QuickSort
differently, but I think it's an entirely fair critique -- examples like this
offer false promises about the practical expressiveness of a language.
More information about the Digitalmars-d
mailing list