Orders of magnitude

Peter Otten __peter__ at web.de
Mon Mar 29 04:58:48 EST 2004


Robert Brewer wrote:

> # bsddb version: c = bsddb.btopen(None)
> for i in x:
>     if i not in c:
>         c[i] = None

You might try a minor change:

for i in x:
    c[i] = None

The fewer the redundancies the larger the speed gain (I suppose; that really
needs testing to be sure).

Peter




More information about the Python-list mailing list