[Python-checkins] CVS: python/dist/src/Doc/lib libcrypt.tex,1.14,

Skip Montanaro skip@mojam.com (Skip Montanaro)
Tue, 15 Feb 2000 12:12:25 -0600 (CST)

    Fred> Greg Stein writes:
    >> Actually, it is arguable which is faster. Using the "in" form means
    >> that you construct the tuple at runtime, then perform the "in"
    >> check. The version using "or" is simply a couple comparisons.

    Fred> Actually, I think the tuple is compiled to an entry in the
    Fred> constants table when the contents are also constants (Jeremy,
    Fred> you're playing with this nowadays; any insight?).

I don't think it does.  This is one of the optimizations I implemented in my 
peephole optimizer though...

Skip Montanaro | http://www.mojam.com/
skip@mojam.com | http://www.musi-cal.com/
"Languages that change by catering to the tastes of non-users tend not to do
so well." - Doug Landauer