"Torsten Bronger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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"?
To be more specific, the (possible) speed increase will come from JIT (Just In Time) compilation technology. JIT technology is quite capable of handling dynamic languages. That has to come after they get a compilable interpreter working, but I believe it was in the original project vision statement. A JIT compiler within the interpreter will put PyPy pretty much on a par with Java as far as speed goes. > <http://www.python.org/pycon/dc2004/papers/27/>: "In the next step > of the project, we will generate C code or machine code from the > source of Pypy, thereby reducing the speed penalty." > > I've been told by so many books and on-line material that Python > cannot be compiled (unless you cheat). So how is this possible? JIT compilers cheat. Specifically, they compile for the observed object environment of a statement, and then insert a test to make sure that the actual environment matches the expected environment. If it doesn't, it goes back to interpretation for that code segment. John Roth > > Tschö, > Torsten. > > -- > Torsten Bronger, aquisgrana, europa vetus -- http://mail.python.org/mailman/listinfo/python-list