[Python-ideas] Optimizing builtins
Cesare Di Mauro
cesare.di.mauro at gmail.com
Sun Jan 2 07:07:21 CET 2011
2011/1/1 Guido van Rossum <guido at python.org>
> Right. That's a much saner solution than trying to generate bulky
> bytecode as Cesare proposed. The advantage of a JIT is also that it
> allows doing these optimizations only in those places where it
> In general I am not much in favor of trying to optimize Python's
> bytecode. I prefer the bytecode to be dead simple.
If Python direction is to embrace some JIT technology, I fully agree with
you: it is best to make VM & compiler simpler.
Anyway, and as I already said before, mine were just examples of possible
things that can happen with optimizations.
> This probably makes
> it an easy target for CS majors interested in code generation, and it
> probably is a great exercise trying to do something like that, but
> let's please not confuse that with actual speed improvements to Python
> -- those come from careful observation (& instrumentation) of real
> programs, not from looking at toy bytecode samples. (Most of the
> bytecode improvements that actually made a difference were done in the
> first 5 years of Python's existence.)
> --Guido van Rossum (python.org/~guido)
But research never stops. SETUP_WITH is just a recent example.
Also, sometimes completely different ideas can bring some innovation. ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas