"Aaron Watters" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
| While trying to optimize some NUCULAR libraries I discovered
| that the best way to merge 2 sorted lists together
| into a new sorted list is to just append
| them and re-sort.

The current version of list.sort (timsort) was designed to take advantage 
of pre-existing order.  It should discover the 2 sorted sublists and merge 
them together.  It will not really re-sort the way it would with random 
data.

A psyco/Python version can be faster only because it avoids the comparisons 
need to discover the existing sorted sublists.

tjr



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to