D vs VM-based platforms

Jan Claeys usenet at janc.be
Mon Apr 30 18:39:10 PDT 2007


Op Mon, 30 Apr 2007 13:44:05 -0700
schreef Walter Bright <newshound1 at digitalmars.com>:

> Jan Claeys wrote:
> > And I think in the case of dynamic languages like Python, a
> > JIT-compiler often can create much better code at run-time than a
> > compiler could do when compiling it before run-time.  
> 
> That's the theory. In practice, Python programmers who need
> performance will develop a hybrid Python/C++ app, with the slow stuff
> recoded in C++.

Just like some people write libraries in Fortran or assembler or some
vector processor language because C and C++ and D are "too slow".   ;-)

There is one commonly used JIT-compiler for Python ('psyco') and it is
actually useful in some cases, while I haven't seen one single
Python-to-native-code compiler that makes code that's actually faster
than the interpreter in most cases...

Python's strength is its "dynamism" and ability to adapt to
"unexpected" changes at run-time.  And the fact that Python developers
write extensions in other languages if speed is really important and
'psyco' doesn't help proves that compiling Python to native code before
it's run is not really a useful option.


-- 
JanC



More information about the Digitalmars-d mailing list