Talk:Sorting algorithms/Merge sort: Difference between revisions

(→‎Java implementation: Aim for idiomatic)
Line 22:
:I made the change. It looks just as readable each way I think and since it's such a big performance boost it seems like a good idea. Thanks. --[[User:Mwn3d|Mwn3d]] 19:12, 23 January 2012 (UTC)
: FWIW, we want ''idiomatic'' implementations. Good practice. Stuff that people with some smarts can look at and learn from. A small decrease in readability for a big gain in performance can be reasonable, though in (almost) all languages it is possible to be both fast and nice to read. (I have my doubts about a few, but maybe I just never grokked the æsthetic there…) That said, the above code looks quite readable to me too; iteration-looping is a wonderful thing. –[[User:Dkf|Donal Fellows]] 22:28, 23 January 2012 (UTC)
 
== Haskell "simple" implementation is Quicksort ==
 
Except I'm mistaken the given Haskell simple implementation is actually a Quicksort algorithm : there is no concept of "merging" lists, and the originallist isn't split but instead filtered between values inferior and values greater than the head of the original list (i.e. something akin to the quicksort pivot) ...
Anonymous user