python vs. java, slight reprise (from sun, no less)
holger krekel
pyth at devel.trillke.net
Sun Feb 9 09:50:55 EST 2003
Hi Gerson,
Gerson Kurz wrote:
> "A study performed by an outside team appears to indicate a rough
> parity in performance between Java and a common implementation of
> another OO language called Python (see IEEE Computing, October 2000,
> "An Empirical Comparison of Seven Programming Languages" by Lutz
> Prechelt of the University of Karlsruhe). Both platforms are Object
> Oriented, support web applications, serialization, internet
> connections and native interfaces. The key difference is that Python
> is a scripting language. This means there is no compilation to byte
> code so the Python runtime environment has to do two things in
> addition to what the Java runtime environment does.
Well, that disqualifies the survey quite a bit.
Python does have a neat Virtual Machine and bytecode.
def f():
print "hello"
import dis
dis.dis(f)
for starters. How can someone assess a "key difference" without
bothering to check it? Oh wait, that's common practice, i forgot :-)
> It has to perform
> syntax checks and it must parse the ascii text provided by the
> programmer. Both of those tasks are performed at compile time by Java
> and so that capability does not have to be in the JRE.
same with python.
> Given this data, it appears that the JRE can actually be simpler than
> the Python RE since Java does at least some of this work at compile
> time.
In fact, Python's VM is simpler.
> The example above of "Hello World" is a good method for getting
> an idea of the minimum support code required at runtime. This support
> code includes garbage collector, byte code interpreter, exception
> processor and the like. Hello World written in Java2 requires 9M for
> this most basic support infrastructure. By comparison, this is
> slightly larger than automountd on Solaris8. The Python runtime
> required to execute Hello World is roughly 1.6M."
>
> from http://www.internalmemos.com/memos/memodetails.php?memo_id=1321
>
> which is a great read for old pythonistas and javabashers like I am ;)
I doubt it (without bothering to read it because of the above
obvious errors), sorry.
holger
More information about the Python-list
mailing list