CPython vs. Jython/JPython

Mike Coffin mhc at Eng.Sun.COM
Sun Nov 5 22:55:07 EST 2000


Courageous <jkraska1 at san.rr.com> writes:

> >> There is no way that a Java program can be faster than the equivalent C
> >> program, on the same computer, if the best practices and idioms of each
> >> language are followed.
> >
> >Why?
> 
> I think this poster was referring to the fact that most JVMs are
> written in C, necessarily creating a bit of a chicken and the egg
> problem. Which isn't to rule out all sorts of other possibilities,
> of course. :)

Maybe I came in late and missed something, but the statement I quoted
doesn't seem to be talking about which came first.  The fact that C
came first and is used to write JVM's has nothing to do with their
relative speed.  

It's perfectly possible to write a compiler that generates much faster
code than the code the compiler itself is running.  E.g., there is
nothing to prevent someone from writing a very good C compiler in
Python.  It might generate such good code that recompiling Python with
it would speed up the original compiler.  

-mike



More information about the Python-list mailing list