[Python-Dev] Fast access to builtins (original) (raw)
M.-A. Lemburg mal@lemburg.com
Fri, 28 Mar 2003 09:34:54 +0100
- Previous message: [Python-Dev] Fast access to __builtins__
- Next message: [Python-Dev] Fast access to __builtins__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Raymond Hettinger wrote:
[per module switch] That makes good sense. Are you guys thinking of something like this:
fastbuiltins = True # optimize all subsequent defs in the module [M.-A. Lemburg]
BTW, why not have a new opcode for symbols in the builtins and then only tweak the opcode implementation instead of having the compiler generate different code ? Either way results in changing one opcode/oparg pair, so I don't see how having a new opcode helps. At some point, the name has to be looked-up and a reference to it stored. Afterwards, LOADCONST is all that is needed to fetch the reference.
Right, but with the new opcode you could have the interpreter decide whether to optimize or not without recompiling the code.
-- Marc-Andre Lemburg eGenix.com
Professional Python Software directly from the Source (#1, Mar 28 2003)
Python/Zope Products & Consulting ... http://www.egenix.com/ mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
Python UK 2003, Oxford: 4 days left EuroPython 2003, Charleroi, Belgium: 88 days left
- Previous message: [Python-Dev] Fast access to __builtins__
- Next message: [Python-Dev] Fast access to __builtins__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]