On Dec 6, 2:14 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-12-06, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > See recipes: > >http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/491285 > >http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/305269 > > That's fairly awesome.
The second one is! That's why it works so fast. Tim Peters optimized this case! Gotta hand it to Tim Peters. The first one should win some sort of obfuscated code contest, imho. It also seems to be 5 times slower than any of the others. btw: Neil's merge_sorted is a bit slower than any of mine due to the use of list.append, I think instead of preallocating a list of the right size. -- Aaron === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=inherently+hosed -- http://mail.python.org/mailman/listinfo/python-list