Raymond Hettinger wrote:

> Based on some ideas from Skip, I had tried transforming the likes of "x
> in (1,2,3)" into "x in frozenset([1,2,3])".  When applicable, it
> substantially simplified the generated code and converted the O(n)
> lookup into an O(1) step.  There were substantial savings even if the
> set contained only a single entry.

savings in what?  time or bytecode size?  constructed micro-benchmarks,
or examples from real-life code?

do we have any statistics on real-life "n" values?

</F> 



_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to