[pypy-dev] Re: [pypy-svn] r8642 - pypy/dist/pypy/objspace/std

Armin Rigo arigo at tunes.org
Fri Jan 28 13:15:59 CET 2005

Hi Christian,

On Fri, Jan 28, 2005 at 02:32:43AM +0100, Christian Tismer wrote:
> I don't see the point why the hash should be stored as a wrapped
> value.

That's because hash__Str() must return a wrapped value, as space.hash(), and
as the W_DictObject expects it.  Of course it would be more efficient if
somehow we passed unwrapped hash values around, but that's a kind of small
optimization that doesn't really pay off the price of making Yet Another
Oddity in the public methods of spaces...

That said, it would also be ok to move the hack into W_DictObject instead of
W_StringObject, by special-casing strings and storing an unwrapped hash cache
into W_StringObject.


More information about the Pypy-dev mailing list