[Python-Dev] Fast access to __builtins__

M.-A. Lemburg mal@lemburg.com
Sat, 29 Mar 2003 12:09:46 +0100

Raymond Hettinger wrote:
> The bad news is that I've made many timings and found only modest
> speed-ups in real code.  It turns out that access time for builtins is
> less significant than the time to call and execute those builtins. 
> But, every little bit helps.

Perhaps you ought to look into special casing calling builtins,
e.g. by adding a byte code CALL_BUILTIN ?!

Since the signatures of the builtins are known in advance, the
calling overhead could be reduced, though I'm not sure how much
more can be gained since the function call code was refactored.

Another idea which might be worth looking into is that of speeding
up parsing of C function call arguments, e.g. by caching the results
or adding fast paths for common combinations.

Marc-Andre Lemburg

Professional Python Software directly from the Source  (#1, Mar 29 2003)
 >>> Python/Zope Products & Consulting ...         http://www.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
Python UK 2003, Oxford:                                      3 days left
EuroPython 2003, Charleroi, Belgium:                        87 days left