2009/2/26 sert <je...@hotmail.com>:
> bearophileh...@lycos.com wrote in
> news:37632421-5475-4859-be83-07ae2eca1...@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.

Good to see that you've already got an improvement. For what it's
worth, this seems to be classic relational database stuff, and a
relational database will be optimised to do these operations and so is
likely to be faster still. I think there are a couple that Python
works well with, but I've never looked into that -- others will no
doubt be along with recommendations now I've raised the subject.

-- 
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to