[Python-3000] Where is PyUnicodeObject->hash supposed to be set? (original) (raw)
Nicholas Bastin nick.bastin at gmail.com
Fri Sep 7 20:30:33 CEST 2007
- Previous message: [Python-3000] clean out the future?
- Next message: [Python-3000] Where is PyUnicodeObject->hash supposed to be set?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-3000] clean out the future?
- Next message: [Python-3000] Where is PyUnicodeObject->hash supposed to be set?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]