[Jim Fulton, on cell dereferencing's (lack of) speed] > This is amazing. Really amazing. I stand corrected.
Well, there's no mystery if you look at LOAD_FAST and LOAD_DEREF in ceval.c; LOAD_DEREF is slower <wink>. The relative speed of approaches changes across Python releases too. For example, module global lookup benefited enormously from a long string of "heroic optimizations" in Python's dict implementation. I consider a difference under 10% to be in the noise, and clawing for one as likely to become a pessimization as to remain an optimization under the next release; e.g., there are some obvious ways to speed LOAD_DEREF (although I don't think anyone at present cares enough to work on that). _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )