[Chandler-dev] Minor python perf hint

Heikki Toivonen heikki at osafoundation.org
Thu Feb 1 17:28:03 PST 2007


0 < 1 < 2 is about 9% faster than 1 > 0 and 1 < 2. This would really
only make a difference in a tight loop that is called hundreds (or
probably thousands) of times. However, personally I think the first form
is also easier to read (and I am so glad Python supports it)!

-- 
  Heikki Toivonen


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://lists.osafoundation.org/pipermail/chandler-dev/attachments/20070201/d5ebf21c/signature.pgp


More information about the chandler-dev mailing list