We're working at the sprint on tracking this down. I want to provide some history first and then what we're looking for feedback on.
Steve Holden found this on Sunday, the pybench try/except test shows a ~60% slowdown from 2.4.3 to 2.5a2. The original test is, roughly: for i in range(N): try: raise ValueError, 'something' except: pass But changing it to the following shows 0% slowdown from 2.4.3 to 2.5a2: e = ValueError('something') for i in range(N): try: raise e except: pass The change is that from 2.4.3 to 2.5a2 includes Brett Cannon's patch to make exceptions all new-style objects. Brett provided the following direction: >Right, I meant change how it (BaseException) is written. Right now >it uses PyMethodDef for magic methods and just uses PyType_New() >as a constructor. I was wondering if, for some reason, it would be >faster if you used a PyType_Type definition for BaseException and >used the proper C struct to associate the methods with the class. Richard Jones has done some investigation, and we're looking at fixing it from the current implementation. This is basically a direct implementation of the old-style exception, but inheriting from object. Converting it to a type in C should reduce the cost dramatically. We're looking for feedback on where this may cause problems or break things. Thoughts? Thanks, Sean -- Thieves broke into Scotland Yard yesterday and stole all the toilets. Detectives say they have nothing to go on. Sean Reifschneider, Member of Technical Staff <[EMAIL PROTECTED]> tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com