[Python-de] Re: [Jython-users] Why eval function in Jython is so
Diez B. Roggisch
deets at web.de
Fre Sep 23 19:16:52 CEST 2005
> JVM was wrote in C
Thats not true - java is slower than C - because of its dynamic nature
and runtime checks (like boundary checks and so on). Just because it is
written in C doesn't sayy anything beyond that it runs on computers...
Python is even more dynamic than java - which maks CPython already
slwoerr than java. Adding that togehter, and you are there.
> it should not slow than CPython, Jython script was
> compiled to java class before it run. So it should not be so slow than
> CPython I think.
Your jython code is _not_ compiled to java. Especially not with eval,
which whole purpose is of being interpreted at runtime. And even if you
used jythonc - it wouldn't make much of a difference, as jythonc is not
so much a compiler for speed reasons but sort of a freezing tool that
makes jython objects callable from java. Not more, not less.
And you still haven't answered the question _why_ you need that
performance. If thats your ultimate goal - use assembler :)