Best way to handle large lists?
Hari Sekhon
hpsekhon at googlemail.com
Tue Oct 3 12:26:22 EDT 2006
Jeremy Sanders wrote:
> Chaz Ginger wrote:
>
>
>> What would sets do for me over lists?
>>
>
> It's faster to tell whether something is in a set or dict than in a list
> (for some minimum size).
>
> Jeremy
>
>
That is surprising since I read on this list recently that lists were
faster than dicts and that variables stored in lists were faster
referenced/used. It was one reason that was cited as to why local vars
are better than global vars. The guy actually did a looping test and
timed it to show the speed difference.
Can anybody please step in and correct us?
-h
Hari Sekhon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20061003/5d312dfc/attachment.html>
More information about the Python-list
mailing list