[Slightly-OT] Wasn't Google supposed to be "avid Python-Users" ?
brueckd at tbye.com
brueckd at tbye.com
Thu Feb 7 10:14:02 EST 2002
On Thu, 7 Feb 2002, Michael Abbott wrote:
> Michael Hudson <mwh at python.net> wrote in news:uk7tpa574.fsf at python.net:
> > But not over Java, surely? I guess a JIT or native compilation will
> > help, but...
>
> I think so. Java byte codes are pretty low level, and don't have to do
> very much, and of course JIT or native compilation can be *very* effective.
> Python byte codes are, on the other hand, much more powerful, and have to
> do quite a lot of run-time work.
[snip]
> My factor of a 100 is a guess; am I wrong? I believe it's fair.
Wouldn't that mean that simple Jython programs should use 100x less CPU
than CPython ones?
I guess it depends on what you're doing. I spend most of my Python time
writing networking clients/servers, small internally-used utilities, text
processing/parsing tools, and playing with Pygame. As far as CPU usage
goes:
- networking stuff - tends to use 1.5X to 2X more CPU than C, and I've
never seen any Java servers come close to the same performance levels.
- utilities and text processing tools - not entirely CPU bound, but they
usually finish by the time the Java VM has loaded, so who knows (I don't
usually deal with huge volumes of text)
- PyGame - hey, it's built on top of SDL. ;-)
I think the last one is important: maybe JIT-compiled stuff *is* 100x less
CPU-intensive than *pure* Python, but how many programs are pure Python?
A huge amount of time is spent in C libraries (I/O, extension modules).
-Dave
More information about the Python-list
mailing list