Torsten Bronger wrote: > Hallöchen! > > Paul Rubin <http://[EMAIL PROTECTED]> writes: > > > Torsten Bronger <[EMAIL PROTECTED]> writes: > > > >> Please could somebody explain to us non-CS people why PyPy could > >> have speed features CPython can't have? > > > > Does the one-word answer "compiler" explain enough? > > No, just more questions. ;-) > > What's supposed to be compiled? Only PyPy itself or also the > programs it's "interpreting"?
There is no "PyPy itself". The distinction bewteen interpreter-level code and application-level code is nothing but a set of coding conventions which are usefull but not necessary to let the type inferencer ( "annotator" in PyPy slang ) terminate definitely on a set of machine-translateable types in case of interpreter-level code. At least the interpreter should not interpret it's own code after an inititalisation phase. Currently type annotated application level code will still be compiled into bytecodes but it is not only possible to JIT and to specialize it by means of Psyco, but it should be possible to compile parts of it into native code like we do today with C-extensions. It's hard for me to recognize a fixedpoint in this process or a clear boundary between interpreter and application level code. This is IMO a pure heuristic not a categorial distinction but is also clear there will ever be a remaining gap due to the dynanism of the language. I think a lot of research understanding this distinction will follow in the next years. As a conclusion: with PyPy Python will still be interpreted, but a large corpus of Python code may be compiled into native code of the underlying machine. Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list