Re: [Python-Dev] 2.5a2 try/except slow-down: Convert to type?

2006-05-30 Thread Sean Reifschneider
Changes have been checked into the trunk for converting exceptions to types instead of classes. According to pybench, 2.5a2 was 60% slower at raising exceptions than 2.4.3, and now trunk is 30% faster than 2.4.3. Yay! Thanks, Sean -- I was on IRC once and got mistaken for Dan Bernstein. I

Re: [Python-Dev] 2.5a2 try/except slow-down: Convert to type?

2006-05-26 Thread Walter Dörwald
Neal Norwitz wrote: This is probably orthogonal to the problem, however, you may want to look into trying to speed up Python/errors.c. This link will probably not work due to sessions, but click on the latest run for python and Python/errors.c

Re: [Python-Dev] 2.5a2 try/except slow-down: Convert to type?

2006-05-25 Thread Neal Norwitz
This is probably orthogonal to the problem, however, you may want to look into trying to speed up Python/errors.c. This link will probably not work due to sessions, but click on the latest run for python and Python/errors.c

Re: [Python-Dev] 2.5a2 try/except slow-down: Convert to type?

2006-05-25 Thread Sean Reifschneider
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

[Python-Dev] 2.5a2 try/except slow-down: Convert to type?

2006-05-24 Thread Sean Reifschneider
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):

Re: [Python-Dev] 2.5a2 try/except slow-down: Convert to type?

2006-05-24 Thread Michael Hudson
Sean Reifschneider [EMAIL PROTECTED] writes: 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

Re: [Python-Dev] 2.5a2 try/except slow-down: Convert to type?

2006-05-24 Thread Fredrik Lundh
Michael Hudson wrote: Could it just be that instantiating instances of new-style classes is slower than instantiating instances of old-style classes? There's not anything in what you've posted to suggest that exceptions are involved directly. python -mtimeit -s class Exception(object): pass

Re: [Python-Dev] 2.5a2 try/except slow-down: Convert to type?

2006-05-24 Thread Fredrik Lundh
Fredrik Lundh wrote: Could it just be that instantiating instances of new-style classes is slower than instantiating instances of old-style classes? There's not anything in what you've posted to suggest that exceptions are involved directly. for completeness, here's the corresponding

Re: [Python-Dev] 2.5a2 try/except slow-down: Convert to type?

2006-05-24 Thread Sean Reifschneider
On Wed, May 24, 2006 at 11:36:52AM +0100, Michael Hudson wrote: Could it just be that instantiating instances of new-style classes is slower than instantiating instances of old-style classes? There's not anything in what you've posted to suggest that exceptions are involved directly. Sorry, I

Re: [Python-Dev] 2.5a2 try/except slow-down: Convert to type?

2006-05-24 Thread Sean Reifschneider
We've done some more research on it, and Richard Jones is working on it right now. We'll see how it works, probably tomorrow. Thanks, Sean -- If you don't have time to do it right, when will you ever find time to do it over? Sean Reifschneider, Member of Technical Staff [EMAIL PROTECTED]