Sean Reifschneider <jafo-python-dev at tummy.com> 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 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. 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. Cheers, mwh -- Get out your salt shakers folks, this one's going to take more than one grain. -- Ator in an Ars Technica news item
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4