CPython vs. Jython/JPython
tdelaney at avaya.com
Mon Oct 30 05:50:56 CET 2000
There are a number of things against this suggestion (note - I'm not
dismissing it out of hand).
1. Need for a Java Virtual Machine.
The CPython interpreter is *much* smaller than the JVM, both in install size
and resource usage. The disparity is even greater when using Stackless
The CPython interpreter is much faster than J(P)ython. Whilst this could be
offset somewhat by doing everything through JNI, this has a few other
Harder to use a single source tree for all platforms.
It will still be *many* times slower than CPython due to the
overhead of JNI.
In addition to the need for JNI (and the incompatibilities introduced by
that) Python would *only* be available on those platforms which had a
well-behaving implementation of the correct version of the JVM. As an
example - I doubt there would be an Amiga version of Python if Python only
ran on top of the JVM.
If Python was written in Java, I highly doubt we would *ever* have seen the
wonderful Stackless implementation come about. Since it has been done people
are looking at how the Stackless extensions could be mapped onto J(P)ython,
but it appears that everything would have to be done with Java Threads -
which will slow Stackless down to a crawl.
Personally, I can't think of any advantages of having the reference
implementation in Java which Python doesn't already have.
I'll let others come up with other reasons for and against.
> -----Original Message-----
> From: D-Man [mailto:dsh8290 at rit.edu]
> Sent: Monday, 30 October 2000 3:28 PM
> To: python-list at python.org
> Subject: CPython vs. Jython/JPython
> This isn't to start a flame war, but to clarify some confusion I have.
> I am wondering why there are two separate python interpreters
> being developed (the one in C, the other in Java). Wouldn't
> it be more productive if both teams worked together on one
> interpreter? Another thought I had was that it would be
> easier to make python cross-platform if it was written in
> Java and let the Java developers worry about the C-level
> platform dependencies. Isn't it also possible to write Java
> extensions in C? (read: ... python extensions in C (using
> the Java interpreter))
> I thank all in advance for your insight into this matter.
More information about the Python-list