j: Next unread message
k: Previous unread message
j a: Jump to all threads
j l: Jump to MailingList overview
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.