28 Jan
2005
28 Jan
'05
6:15 a.m.
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. Armin