Possible optimisation trick?
Russ Brown
pickscrape at gmail.com
Tue Apr 29 21:21:16 BST 2008
John Arbash Meinel wrote:
> -----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.
>
I figured you might have. :)
It was worth mailing about though just in case I suppose.
--
Russ.
More information about the bazaar
mailing list