[Python-checkins] CVS: python/dist/src/Python ceval.c,2.287,2.288
M.-A. Lemburg
mal@lemburg.com
Wed, 07 Nov 2001 21:41:13 +0100
Fredrik Lundh wrote:
>
> mal wrote:
> > AFAIR, there was consent over this
>
> where?
Guido:
"""
> As with all micro-optimizations, the win usually only shows
> up in some applications. The one I'm writing uses lot's of
>
> if tagtype == 'starttag':
> if tagtype == 'endtag':
> ...
>
> Since the 'starttag' and 'endtag' strings are interned and
> I'm also interning the strings which are stored in tagtype,
> I'd like to benefit from the fact that the compare will actually
> work as 'is'-compare. However, I don't want to use 'is' because
> I consider interning only an optimization and not a feature
> of the language.
Agreed.
> That's why I would like the simple
>
> if (v == w) return 0;
>
> integrated into the ceval loop right along the INT-compare
> optimization.
Maybe this could be done as follows:
if (v == w && PyString_CheckExact(v)) return 0;
"""
> cannot find anything in the "slices and == optimization"
> thread (at least not in the parts that reached my mailbox)
>
> (guido agreed that it would be nice if lists supported slice
> objects, but it doesn't look like that was what you checked
> in ;-)
Barry mentioned that this would have been a new feature and
we're in a feature freeze... I'll continue to work on that one
for 2.3.
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Consulting & Company: http://www.egenix.com/
Python Software: http://www.lemburg.com/python/