On Thu, Jul 22, 2010 at 6:52 PM, Terry Reedy <tjre...@udel.edu> wrote:
> Another sort of issue will be code maintainability. Two algorithms is > potentially more problems than one. To me, that partly depends on how well > factored the current code is. > Two algorithms is more code than one algorithm. No way around that. :-) Radix sort is a relatively simple sorting algorithm, so the extra complexity is not too bad. Once I have a patch ready, others can decide if the additional complexity is worth the performance boost. > It would be best is rsort were a switch replacement for timsort after all > preparations (such as decorate) were done. > Yes, that's pretty much what I have in mind. In pseudo-code: sort: decorate() if all_correct_type and n > 40: radix_sort() else timsort() undecorate() > And that is about all I can think of. Thank you for the thoughts. I appreciate them! -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
-- http://mail.python.org/mailman/listinfo/python-list