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

Armin Rigo arigo at tunes.org
Tue May 30 00:27:09 CEST 2006

Hi Fredrik,

On Tue, May 30, 2006 at 12:01:46AM +0200, Fredrik Lundh wrote:
> not unless you can produce some code.  unfounded accusations don't 
> belong on this list (it's not like the sprinters didn't test the code on 
> a whole bunch of platforms), and neither does lousy benchmarks (why are 
> you repeating the 0.5% figure when pystone doesn't even test non-string 
> dictionary behaviour?  PyString_Eq cannot fail...)

Sorry, I do apologize for my wording.  I must admit that I was a bit
apalled by the amount of reference leaks that Michael had to fix after
the sprint, so jumped to conclusions a bit too fast when I saw by 1GB
laptop swap after less than a minute.  See my e-mail, which crossed
yours, for the explanation.

The reason I did not quote examples involving non-string dicts is that
my patch makes the non-string case simpler, so -- as I expected, and as
I have now measured -- marginally faster.  All in all it's hard to say
if there is a global consistent performance change.  At this point I'd
rather like to spend my time more interestingly; this might be by
defending my point of view that very minor performance hits should not
get in the way of fixes that avoid very obscure bugs, even only
occasionally-occuring but still very obscure bugs.

A bientot,


More information about the Python-Dev mailing list