Guido van Rossum 3a4dfc87e6 Another ugly inlining hack, expanding the two PyDict_GetItem() calls
in LOAD_GLOBAL.  Besides saving a C function call, it saves checks
whether f_globals and f_builtins are dicts, and extracting and testing
the string object's hash code is done only once.  We bail out of the
inlining if the name is not exactly a string, or when its hash is -1;
because of interning, neither should ever happen.  I believe interning
guarantees that the hash code is set, and I believe that the 'names'
tuple of a code object always contains interned strings, but I'm not
assuming that -- I'm simply testing hash != -1.

On my home machine, this makes a pystone variant with new-style
classes and slots run at the same speed as classic pystone!  (With
new-style classes but without slots, it is still a lot slower.)
2002-08-19 20:24:07 +00:00
..
2002-06-11 06:22:31 +00:00
2002-01-23 15:51:12 +00:00
2002-08-15 14:59:02 +00:00
2002-02-27 13:29:46 +00:00
2002-08-15 14:59:02 +00:00
2002-07-30 11:44:44 +00:00
2002-06-11 06:22:31 +00:00
2002-08-15 14:59:02 +00:00