[Python-ideas] Optimizing builtins

Guido van Rossum guido at python.org
Sat Jan 1 21:37:59 CET 2011

On Sat, Jan 1, 2011 at 12:35 PM, Benjamin Peterson <benjamin at python.org> wrote:
> Guido van Rossum <guido at ...> writes:
>> The compiler has no way to notice this when a.py is being compiled.
> You could still optimize it if you insert a runtime "guard" before the range
> usage and see if its been overridden.

Yeah, that was Cesare's idea. I think that's a great strategy for a
JIT compiler, but not appropriate for bytecode (IMO).

--Guido van Rossum (python.org/~guido)

More information about the Python-ideas mailing list