[pypy-dev] [pypy-svn] r30034 - pypy/dist/pypy/objspace/std
Ben.Young at risk.sungard.com
Ben.Young at risk.sungard.com
Mon Jul 17 09:56:38 CEST 2006
pypy-dev-bounces at codespeak.net wrote on 16/07/2006 22:40:01:
> Hi Ben Young,
Hi Alexander,
>
> On Fri, 14 Jul 2006 12:12:59 +0100, Ben.Young at risk.sungard.com wrote:
>
> > This looks really good! It shows there are still some major (easy)
> > performance wins in PyPy.
>
> Yes, I measured 35% speedup on richards/pystone on "the other branch"
(that
> solely knows this kind of dictionary unlike the current trunk).
>
> > One question, why would you need any calls to str2object in any of the
> > non-mutating methods?
>
> Because every class can define it's own hash/eq functions that might be
> considered insane in case of having them return hashes that match the
> hashes of a string. That would mean that {"foo": 1}[myClass()] could
return
> 1. Therefore we have to switch the mode while having a shortcut for
types
> which are known to have sane hashes only.
Ouch! Yes, I see the problem now. Roll on parameretised collections :)
>
> > w_lookup.__hash__()
>
> I didn't even consider that people would write __hash__ methods with
> side-effects :)
>
> Kind regards,
> Alexander, who has resent this posting 2 days after the initial try -
Gmane
> problems?
>
Not me!
> _______________________________________________
> pypy-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/pypy-dev
>
More information about the Pypy-dev
mailing list