2009/2/26 sert <[email protected]>: > [email protected] wrote in > news:[email protected] > 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
