[Python-Dev] Caching function pointers in type objects (original) (raw)

Benjamin Peterson benjamin at python.org
Wed Mar 3 22:29:25 CET 2010


2010/3/3 Daniel Stutzbach <daniel at stutzbachenterprises.com>:

I think I see a way to dramatically speed up PyObjectRichCompareBool when comparing immutable, built-in, non-container objects (int, float, str, etc.).  It would speed up list.sort when the key is one of those types, as well as most operations on the ubiquitous dictionary with str keys.

Is that a worthwhile avenue to pursue, or is it likely to be redundant with Unladen Swallow's optimizations?

Perhaps you could explain what exactly you want to do. :) That would help us make a judgment.

If I can find time to pursue it, would it be best for me to implement it as a patch to Unladen Swallow, CPython trunk, or CPython py3k?

Your choice.

-- Regards, Benjamin



More information about the Python-Dev mailing list