[Python-Dev] Let's stop eating exceptions in dict lookup

Tim Peters tim.peters at gmail.com
Tue May 30 06:36:32 CEST 2006


[Armin Rigo]
> ...
> ...
> Am I allowed to be grumpy here, and repeat that speed should not be
> used to justify bugs?

As a matter of fact, you are.  OTOH, nobody at the sprint made that
argument, so nobody actually feels shame on that count :-)

I apologize for the insufficiently reviewed exception-rework patch
anyway.  The massive try/raise/except slowdown in 2.5a2 (compared to
2.4.3) was depressing and surprising, and figuring it out & repairing
it consumed various peoples' time across the whole week.  By the time
Saturday came around, I was fried enough that "well, people have
hacked on this all week, the slowdown finally got replaced by a
speedup, and all the tests pass -- enough already, let's go home!"
ruled.  So, as everyone suspected all along, it's Neal's fault for not
running his refleak test more often ;-)

> ...
> It would have saved me two hours-long debugging sessions, and I consider
> myself an everyday Python user, so yes, I think so.

I'll try to review your patch carefully Tuesday, but I'm willing to
accept a slowdown for this too (although from a quick look I doubt
there's a measurable one, and your approach is wholly sane).


More information about the Python-Dev mailing list