Will Java go native?

Bruno Medeiros brunodomedeiros+dng at gmail.com
Thu Sep 19 10:34:20 PDT 2013


On 19/09/2013 17:58, Andrei Alexandrescu wrote:
> On 9/19/13 1:25 AM, Russel Winder wrote:
>> Java is no longer under-performant compared to C, C++, Fortran, D, Go,
>> Rust. Check the benchmarks.
>
> Hmmm, this is not established wisdom and the glib "check the benchmarks"
> doesn't quite help.
>
> Java has gotten on par with C and C++ for raw performance of "straight"
> code (numerics, I/O etc). I've seen such. Java seems to have issues
> involving layout control, which is an important influencer of
> performance in computing nowadays.
>
> Clearly the Java community has amassed a nice bag of tricks regarding
> performance optimization (parallel arrays, hoisting allocations, etc)
> but systems compilers and techniques have also made solid progress. When
> it comes to getting "all" performance, the C model is where it's at.
>
>
> Andrei
>

I was about to say something similar. Java is no longer under-performant 
to C/C++, etc., for a *certain* class of applications only. Applications 
that mainly do data manipulation, I/O, etc., because the JIT will 
(eventually) compile the Java bytecode to native code.
So Java really is not behind because of being VM-based instead of fully 
native-based.

Generally though, I would still say Java is under-performant compared to 
C/C++, etc., although I would say it's mainly due to lack of optional 
manual memory management. Or lack of value-types (which in a way, are a 
form of memory management).
I didn't think layout control would be a major issue, except for a very 
specific type of applications, no? That seems like a very low level 
optimization.

-- 
Bruno Medeiros - Software Engineer


More information about the Digitalmars-d mailing list