[Python-Dev] try-except slower in 2.6 (was: performance)

Antoine Pitrou solipsis at pitrou.net
Mon Aug 25 17:42:41 CEST 2008

M.-A. Lemburg <mal <at> egenix.com> writes:
> That's a huge slow-down compared to 2.5.
> Are there any obvious reasons for this ? Has the exception handling
> mechanism changed that much between 2.5 and 2.6 ?

I've looked at it a bit and I think it's because of the
issubclass()/isinstance() slowdown (which itself is due to ABCs).

If I apply the patch in http://bugs.python.org/issue2534, the exception handling
slowdown seems to disappear.

More information about the Python-Dev mailing list