[Python-Dev] [ANN] VPython 0.1
Stefan Behnel
stefan_ml at behnel.de
Fri Oct 24 14:34:22 CEST 2008
Greg Ewing wrote:
> glyph at divmod.com wrote:
>
>> Is there any reason this should be a separate project rather than just
>> be rolled in to the core?
>
> Always keep in mind that one of the important characteristics
> of CPython is that its implementation is very straightforward
> and easy to follow. Replacing the ceval loop with machine
> generated code would be a step away from that.
Funny to hear that from the author of a well-known code generator. ;-)
I haven't looked at the specific Vmgen code in question, but I tend to find a
short DSL description of repetitive functionality much more straightforward
than the same thing implemented in custom, hand-optimised code in a general
purpose language like C. Just think of the switch split that MAL described in
one of his comments. Having two switch statements and a couple of separate
special cases for a single eval loop might look pretty arbitrary and not
straight forward at all to a reader who doesn't have enough background
regarding the performance characteristics of Python's VM statements.
Stefan
More information about the Python-Dev
mailing list