On 2007-12-06, Aaron Watters <[EMAIL PROTECTED]> wrote:
> 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.

I was hoping that, as it was slightly simpler that way, it would
be slightly faster. But sadly, it wasn't. I ultimately added that
optimization, too.

-- 
Neil Cerutti
I make love to pressure. --Stephen Jackson
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to