Re: Sort comparison

2012-05-01 Thread Ian Kelly
sort. I realize it's commonly said that radixsort is n*k rather than n*log(n). I've been making that case that in real life, frequently k==log(n). Anyway, here's the comparison, with code and graph: http://stromberg.dnsalias.org/~strombrg/sort-comparison/ It can be difficult to distinguish O(n

Re: Sort comparison

2012-05-01 Thread Terry Reedy
On 5/1/2012 1:25 AM, Dan Stromberg wrote: Anyway, here's the comparison, with code and graph: http://stromberg.dnsalias.org/~strombrg/sort-comparison/ (It's done in Pure python and Cython, with a little m4). Interesting, BTW, that an unstable quicksort in Cython was approaching timsort as a C

Re: Sort comparison

2012-05-01 Thread Dan Stromberg
://stromberg.dnsalias.org/~strombrg/sort-comparison/ It can be difficult to distinguish O(n) from O(n log n) on a log-log plot, so I don't think that graph makes your point very well. Thank you for your comment. Do you have a suggestion for a better type of graph - or other linearity/nonlinearity

Re: Sort comparison

2012-05-01 Thread Dan Stromberg
On Tue, May 1, 2012 at 10:51 AM, Terry Reedy tjre...@udel.edu wrote: On 5/1/2012 1:25 AM, Dan Stromberg wrote: Anyway, here's the comparison, with code and graph: http://stromberg.dnsalias.org/**~strombrg/sort-comparison/http://stromberg.dnsalias.org/%7Estrombrg/sort-comparison/ (It's done

Re: Sort comparison

2012-05-01 Thread Ian Kelly
==log(n). Anyway, here's the comparison, with code and graph: http://stromberg.dnsalias.org/~strombrg/sort-comparison/ It can be difficult to distinguish O(n) from O(n log n) on a log-log plot, so I don't think that graph makes your point very well. Thank you for your comment. Do you

Re: Sort comparison

2012-05-01 Thread Dan Stromberg
that radixsort is n*k rather than n*log(n). I've been making that case that in real life, frequently k==log(n). Anyway, here's the comparison, with code and graph: http://stromberg.dnsalias.org/~strombrg/sort-comparison/ It can be difficult to distinguish O(n) from O(n log n) on a log-log plot

Sort comparison

2012-04-30 Thread Dan Stromberg
). I've been making that case that in real life, frequently k==log(n). Anyway, here's the comparison, with code and graph: http://stromberg.dnsalias.org/~strombrg/sort-comparison/ (It's done in Pure python and Cython, with a little m4). Interesting, BTW, that an unstable quicksort in Cython