why python is slower than java?

Christopher Koppler klapotec at chello.at
Fri Nov 5 03:16:28 EST 2004


On Fri, 05 Nov 2004 07:11:33 +0000, Maurice LING wrote:

> What I need to work on now is something that requires speed (and dealing 
> with files), without user's intervention. So the part about users' delay 
> time is not in the equation. My choices boils down to Python or Java.

Speed in what area? Dealing with files, is it a heavily I/O-based program?
If so, choice of programming language will very probably hardly impact
performance (well, depending of course on exactly you want to do, there
may of course be differences...).
Or do you want to crunch numbers? Python has great extensions for that,
written in highly optimized C. Come to think of it, Python has great
built-in datatypes and extensions for all manner of things, written in
highly optimized C. So even if your application wants to do some heavy
processing of <whatever> that doesn't depend on external factors like I/O
speed, the network or user interaction, Python will generally be fast
enough.
And as for the statically typed nature of Java providing speed benefits,
take a look at Psyco, which often (but not always) helps enormously.

So everything boils down to two points: what exactly you want to do - if
you can tell us that, someone better qualified and less biased than
myself might actually be able to offer you concrete advice on what to
choose - and as always: premature optimization is the root of all evil :-)

-- 
Christopher




More information about the Python-list mailing list