11 Feb
2002
11 Feb
'02
8:48 p.m.
Oren> Problem: Python name lookup in dictionaries is relatively slow. ... [ lots of interesting stuff elided ] ... This looks pretty much like a no-brainer to me, assuming it stands up to close scrutiny. The only thing I'd change is that if PyDict_GetItem_Fast is a macro that only works for interned strings, I'd change its name to reflect its use: PyDict_GET_ITEM_INTERNED or something similar. As a further test, I suggest you give the pystone benchmark a whirl, not because it's such a kickass benchmark, but because it occasionally fiddles global variable values. I imagine it will do just fine and probably run a bit faster to boot. Skip