R-alpha: speed of sort(.) and order(.)

Ross Ihaka ihaka@stat.auckland.ac.nz
Thu, 4 Sep 1997 10:26:46 +1200 (NZST)

Martin Maechler writes:
[ stuff on sorting  which I leave out ]

 > which makes 'sort' almost a factor of 2  FASTER for an unsorted 'x'.
 > Any comments from the coders  (R & R) ?

I wasn't there, I hardly knew the woman and anyway it wasn't my dog :-).

Well, I didn't look closely at the code, but as I recall both "sort"
and "order" use a shellsort recomended by Sedgewick (he says only
true sorting gurus like him should attempt quicksort and that mortals
like me should stick with shellsort).

It does look odd.  When I get a moment I will dig deeper.
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch