CPython vs. Jython/JPython

Alex Martelli aleaxit at yahoo.com
Mon Oct 30 12:31:56 EST 2000


"D-Man" <dsh8290 at rit.edu> wrote in message
news:mailman.972916946.25385.python-list at python.org...
>
> 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

Right.  I can write a C app which spins a million times between each
pair of real operations, thus getting it to be just as slow as I like
("My lord, with you at the helm, we cannot lose!" -- "well, we COULD
if we WANTED to" -- quoted from memory from "Black Adder" episode 1).

Apparently, not a few programmers manage to do that (or the equivalent)
even without trying...


> 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

It's Lutz Prechelt's study, already often quoted on this group -- see:
http://wwwipd.ira.uka.de/~prechelt/Biblio/
for this and many other studies; a more complete account than the one
published in 'Computer' is, in particular, at:
http://wwwipd.ira.uka.de/~prechelt/Biblio/jccpprtTR.pdf

Basically, he has empirically proved that the individual programmer's
ability is more important than language-choice; *median* execution
times are optimal for C (but the sample is small, so statistical
significance is suspect), second-best for Perl and Python ex aequo
(no statistically significant difference between them), with Java
_and_ C++ having slower medians (!).

Looking only at the _best_ program in each language (presumably
more representative of the language's actual possibilities, when
used by somebody who doesn't insert delay loops on purposes:-),
C was fastest, C++ second, with Java/Perl/Python third ex aequo
within statistical significance (and Tcl and Rexx out in the
left field, but that's another issue; unfortunately for most
other measurements Tcl and Rexx were averaged with Python and
Perl, thus somewhat obscuring the truly excellent performances
of the P-languages compared to strictly-statically typed ones).


Alex






More information about the Python-list mailing list