Efficient searching through objects

sert jerry at hotmail.com
Thu Feb 26 07:42:46 EST 2009


bearophileHUGS at lycos.com wrote in
news:37632421-5475-4859-be83-07ae2eca1773 at r4g2000yqa.googlegro
ups.com: 

> Try using a dict instead, where keys are the names and
> objects the values (it turns a linear search in a quick
> hash look up). . Then tell us the performance changes.
> 

It halved the overall execution time. Thanks.



More information about the Python-list mailing list