interpreter vs. compiled

Terry Reedy tjreedy at udel.edu
Fri Aug 1 16:38:53 EDT 2008


castironpi wrote:
> Similarly, I take it that the decision to make CPython a stack machine
> + VM was a design decision, not a necessity, favoring internal
> simplicity over the extra 5%.

Years ago, someone once started a project to write a register-based 
virtual machine for (C)Python. I suspect it was abandoned for some 
combination of lack of time and preliminary results showing little 
speedup for the increased complication.  But I never saw any 'final 
report'.

> And furthermore, I think I'm getting
> confused about what exactly constitutes an interpreter: it is whether
> there is a process that runs product instructions, or the product
> instructions can run standalone.  I would take 'compiler' to mean,
> something that outputs an .EXE executable binary file,

This is way too restrictive.  Does *nix have no compilers?  In any case, 
the CPython compiler uses stadard compiler components: lexer, parser, 
syntax tree, code generator, and peephole optimizer.  The result is a 
binary file (.pyc for Python compiled) executable on a PyCode machine.




More information about the Python-list mailing list