[Zope3-checkins] Re: SVN: Zope3/trunk/src/zope/tal/ The lists has been changed to dicts for faster membership testing

Dmitry Vasiliev lists at hlabs.spb.ru
Fri Apr 22 11:19:06 EDT 2005


Fred Drake wrote:
> On 4/22/05, Dmitry Vasiliev <lists at hlabs.spb.ru> wrote:
> It might be interesting to try the C implementations of sets in Python
> 2.4 as well.  I expect it's similar to the dict, but the frozenset may
> offer some benefits (not sure).

Hmm... Dicts is the best.

List: [3.6132634175572593, 3.6005866667411639, 3.589006144635702]
Dict: [1.8321392802716545, 1.8291235338569578, 1.8336291344290974]
Set: [1.9347207536153341, 1.9356901505638291, 1.9329386835477713]
FrozenSet: [1.9277402574908287, 1.9275427463546357, 1.9276584035121793]

-- 
Dmitry Vasiliev (dima at hlabs.spb.ru)
     http://hlabs.spb.ru



More information about the Zope3-Checkins mailing list