[Python-Dev] Patch #552433
Guido van Rossum
guido@python.org
Wed, 08 May 2002 15:53:28 -0400
> When profiling, I found that Python, with iterators, spends a
> significant amount of time in allocating IndexError exceptions, so I
> thought that patch makes sense. There is also speed to be gained from
> accessing the tuple directly (thus bypassing the function call), but
> that may not be so relevant.
Ah, that helps.
[...]
> So it appears that a significant fraction of the exhausted containers are
> indeed tuples, justifying the special-casing.
OK, I'm convinced.
--Guido van Rossum (home page: http://www.python.org/~guido/)