CPython vs. Jython/JPython
D-Man
dsh8290 at rit.edu
Mon Oct 30 09:39:18 EST 2000
Java isn't necessarily slower than C. (I should expand that a little: Java *apps* aren't necessarily slower than C *apps*) There was an article published in the October 2000 edition of IEEE Computer magazine giving an experimental, quantitative analysis of 7 programming languages. A number of the Java implementations (of the solution) were faster than some of the C implementations. (BTW, there were 24 Java implementations and only 5 C implementations) As far as memory usage goes, the Java programs were much higher than everything else.
I am unfamiliar with JNI so I'll have to take your word for it.
I did read an article on Stackless (C)Python and it looked very interesting. If it can't be implemented in Java, that would be a good reason to stick with C.
My other question still stands, however:
Wouldn't it be more productive if both teams worked together on the same interpreter?
Thanks for the response.
-D
On Sun, 29 Oct 2000 23:50:56 "Delaney, Timothy" wrote:
> 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
> CPython.
>
> 2. Speed.
>
> 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
> problems:
>
> 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.
>
> 3. Compatibility
>
> 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.
>
> 4. Stackless.
>
> 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.
>
> Tim Delaney
> PIP
More information about the Python-list
mailing list