Python too slow?

Paul Boddie paul at boddie.org.uk
Wed Jan 16 07:21:17 EST 2008


On 16 Jan, 02:17, "Jaimy Azle" <ja... at localhost.com> wrote:
>
> Wow, serious... what you've done was really, really cool... :)

In practice, not that cool. ;-)

> I was expect there are nobody willing to do to have python runs Java
> Language (such as PyPy) over CPython. Perhaps your javaclass does not work
> just like as PyPy, but really... it is damned cool to get CPython execute
> java byte-code, congratulations...

Well, the limitations that stopped me working on it are listed on the
page I referenced, so it wasn't that cool in the end. In fact, the
project grew out of just wanting to inspect .class files and pull out
method signatures, but it was so tempting to see whether Java
bytecodes could be rewritten and run in a CPython environment.

I think the benefits of running Java on CPython are significantly less
than those had by running Python on the Java VM (or another VM).
Firstly, who wants to write statically typed code which then runs on a
virtual machine that can't take advantage of the type declarations?
Secondly, isn't it just better to use a virtual machine with just-in-
time compilation and all sorts of security mechanisms if you're
wanting to write the Java code that, when compiled, can take advantage
of all that stuff? In other words: what makes CPython a compelling VM
for the Java programmer?

My perspective now is that it's a lot more interesting to target
Python for virtual machines other than the CPython one because that's
where the performance and functionality benefits are most likely to be
found. And the most important motivation for this: I prefer writing
Python, not Java. ;-)

Paul



More information about the Python-list mailing list