It should be set in unicode_hash(). If you compare the trunk version of that function with the py3k branch version, you see that it's been refactored, and in the refactoring, setting ->hash was omitted. It should be trivial to put it back.
On 9/7/07, Nicholas Bastin <[EMAIL PROTECTED]> wrote: > Before I do a bunch of searching around in the source, perhaps someone > just knows the answer to this question. > > A quick trip through the debugger indicates that the reason > PyDict_GetItem is being called 5 million times more often in > PyEval_EvalFrameEx in 3.0 (in pystone 100000) is because while > PyString_CheckExact was swapped out for PyUnicode_CheckExact in > LOAD_GLOBAL, ((PyUnicodeObject*)w)->hash always evaluates to -1, which > punts us down to the non-inline code. Presumably > ((PyStringObject*)w)->ob_shash was already set at this point, which is > why it worked in 2.6 and previous. > > Before I spend a lot of time trying to track down where this is > supposed to be getting set (or, needs to be being set), does anyone > know where this is supposed to happen? > > -- > Nick > _______________________________________________ > Python-3000 mailing list > [email protected] > http://mail.python.org/mailman/listinfo/python-3000 > Unsubscribe: > http://mail.python.org/mailman/options/python-3000/guido%40python.org > -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
