Performance: sets vs dicts.

Aahz aahz at pythoncraft.com
Wed Sep 1 11:40:37 EDT 2010


In article <mailman.246.1283265964.29448.python-list at python.org>,
Jerry Hill  <malaclypse2 at gmail.com> wrote:
>On Tue, Aug 31, 2010 at 10:09 AM, Aahz <aahz at pythoncraft.com> wrote:
>>
>> I suggest that we should agree on these guarantees and document them in
>> the core.
>
>I can't get to the online python-dev archives from work (stupid
>filter!) so I can't give you a link to the archives, but the original
>thread that resulted in the creation of that wiki page was started on
>March 9th, 2008 and was titled "Complexity documentation request".

http://mail.python.org/pipermail/python-dev/2008-March/077499.html

>At the time, opposition to formally documenting this seemed pretty
>widespread, including from yourself and Guido.  You've obviously
>changed your mind on the subject, so maybe it's something that would
>be worth revisiting, assuming someone wants to write the doc change.

Looking back at that thread, it's less that I've changed my mind as that
I've gotten a bit more nuanced.  I still think that making a full set of
algorithmic guarantees is a Bad Idea, but I think that any implementation
that doesn't have O(1) for list element access is fundamentally broken,
and we should probably document that somewhere.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"...if I were on life-support, I'd rather have it run by a Gameboy than a
Windows box."  --Cliff Wells



More information about the Python-list mailing list