Possible optimisation trick?
John Arbash Meinel
john at arbash-meinel.com
Tue Apr 29 20:56:04 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Russ Brown wrote:
| Apologies if this is old news to you highly experienced Python
| developers, I'm not intending to insult anyone by suggesting this. :)
|
| But I just saw this on Planet Ubuntu:
|
| http://juliank.wordpress.com/2008/04/29/python-speed-x-in-list-vs-x-in-set/
|
| ...and wondered if it might be of use in helping to improve bzr's
| performance?
|
| I'm not particularly well versed in Python optimisation techniques so
| this was completely new to me. Again, apologies if it's well-known
| already and completely useless as a result. :)
|
We've had places in our code that had x in list, but we've generally caught them
an changed them to x in set(list).
Certainly that is an optimization that we've kept in mind.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkgXfVQACgkQJdeBCYSNAANY1ACfSRClL//G7lVeb8JauJ0db3td
9zQAoI+bjmVw92qbMVX6udjDi8PFRC1r
=rCr0
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list