D vs VM-based platforms

Don Clugston dac at nospam.com.au
Mon Apr 30 23:34:24 PDT 2007


lubosh wrote:
> Sean Kelly Wrote:
> 
>> Java runs on a VM largely because it allows proprietary applications to 
>> be run on any platform with a supporting VM. The alternative would be 
>> to distribute code in source form and have the user build locally, or to 
>> pre-build for every target platform (which is not always feasible).
> 
> I don't mind to do build for every target platform. There's a lot of I/O and CPU overhead initializing JIT compiler and compiling source runtime. Users are constantly complaining about start-up times. That's why Microsoft provided utility called NGEN which is producing native binaries of .NET bytecode so JIT compilation won't be needed. Whole .NET framework is practically NGENed during installation.
> 
> I understand JIT compilation is not going away, especially for dynamic languages such as Python but I'm not sure if we can really squeeze that much more from JIT compilation of statically-typed languages. If there are not going to be significant performance gains in comparison to running pre-compiled programs, then I suppose we're just adding one unnecessary layer and JAVA+.NET are going wrong direction.
> 
> I'm just looking for answers if JIT compilation for statically-typed languages is doomed or has any hope.

I don't think JIT as performed by Java and .NET makes any sense; it's 
performed far too late.
However, the fast fourier transform code in www.fftw.org is a stunning 
example of an alternative. It compiles several algorithms, and profiles 
each of them. Then it links in the fastest one.
You have to be able to JIT the algorithm; JITing the code generation 
step is useless.



More information about the Digitalmars-d mailing list