[Zope3-dev] Re: Dicts for faster membership testing

Florent Guillaume fg at nuxeo.com
Mon Apr 25 09:03:06 EDT 2005


Stephan Richter  <srichter at cosmos.phy.tufts.edu> wrote:
> On Friday 22 April 2005 10:32, Dmitry Vasiliev wrote:
> > Old code (with lists):
> >
> > [29.604110019569525, 29.467640440335295, 29.480704670565679]
> >
> > New code (with dicts):
> >
> > [29.188246830253565, 29.027186136785541, 29.018876700809741]
> 
> A 1% increase; not bad. Definitely noticable for large apps.

Hm I'd have said: A 1% increase, never worth the bother, will be drowned
in other noise anyway.

However in this case I agree that using dicts for membership testing
*is* good practice.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the Zope3-dev mailing list