I found a great article on performance comparison of java and python. Here are the details.. Java is fast… Here is the link to the page and also the content…. You can access the original mailing list article at
http://groups.google.com/group/comp.lang.python/browse_thread
/thread/f7e8b7a2b4b533fe/ebf2a2f70e730eae%23ebf2a2f70e730eae?sa=X&oi=groupsr&start=0&num=3
I was worried the email list from the group maybe purged some day and this is really good stuff so I copied it here I hope this is not a issue….:(
—————–Email Details——————
Java vs Python Benchmarks: Java is faster
Messages 1 – 25 of 27 in topic – view as tree Newer »
Bryan Jan 31 2002, 10:08 am show options
Newsgroups: comp.lang.python
From: Bryan - Find messages by this author
Date: Thu, 31 Jan 2002 09:06:52 -0500
Local: Thurs, Jan 31 2002 10:06 am
Subject: Java vs Python Benchmarks: Java is faster
Reply to Author Forward Print Individual Message Show original Report Abuse
For what it is worth to people, I have taken the liberty of benchmarking
the new Java SDK ( 1.4.0 ) against Python 2.1 and 2.2. The tests originate
from:
http://www.twistedmatrix.com/users/glyph/rant/python-vs-java.html
Point form Summary:
- Java has improved its Standard Output
- Java has improved its Hash table implementation
- Java has improved its IO routines
- Java has improved its Object Allocation
- Python has improved its Native methods
- Python has improved its interpreter speed
- Python allocates objects 57 times slower than java
- Both Python and Java have increased their interpreter initialization
times, but Python has done so by a much smaller margin.
Interesting differences between Python 2.1 and 2.2:
- I/O is slower in 2.2
- List and Hash are slightly improved in 2.2
- Object allocation shows slight improvement
- Interpreter intialization time has doubled in 2.2
The Results (fixed-font, space-formatted):
JDK 1.4.0 vs Python on an 800Mhz Pentium 3, 512 MB RAM,
Unloaded linux 2.4.8 i686 system, no X-Windows, few daemons.
Internet: 400 KB/s Down, 15 KB/s up. Results are an average of 10 tests.
Java2 Python 2.1 Summary
—– ———- ——-
ConsoleTest 12.34 8.3 Python is 1.4 times faster
HashTest 0.98 2.14 Java is 2.18 times faster
IOTest 2.63 10.25 Java is 3.8 times faster
ListTest 0.65 2.95 Java is 4.5 times faster
NativeTest 1.40 2.29 Java is 1.6 times faster
NoTest 0.34 0.02 Python is 17 times faster
ObjectTest 1.10 62.79 Java is 57 times faster
SpeedTest 0.34 0.64 Java is 1.8 times faster
URLTest 14.53 13.69 Python and Java are equivalent*
Java2 Python 2.2 Summary
—– ———- ——-
ConsoleTest 12.34 8.72 Python is 1.4 times faster
HashTest 0.98 2.1 Java is 2.14 times faster
IOTest 2.63 11.63 Java is 4.4 times faster
ListTest 0.65 2.71 Java is 4.16 times faster
NativeTest 1.40 2.26 Java is 1.6 times faster
NoTest 0.34 0.04 Python is 8.5 times faster
ObjectTest 1.10 61.71 Java is 56.1 times faster
SpeedTest 0.34 0.63 Java is 1.8 times faster
URLTest 14.53 14.71 Python and Java are equivalent*
* The slight discrepancies are most likely due to network fluctuations.
As a side note, I am very much a python proponent. Speed is not everything,
otherwise we would still be coding in straight machine language
If this
serves to debunk one pythoneer’s baseless comments on the slow speed of
Java ( as it did to me ) then it has served its purpose.
Happy coding,
–
Bryan Mongeau
http://www.eevolved.com/bryan
–
“Imagination is more important than knowledge.”– Einstein