3 ms·
Yes. Java is getting closer and closer to native code performance. In some rare cases it can even beat C. But this is after billions of dollars have been thrown
by exDM69 14y ago
Yes. Java is getting closer and closer to native code performance. In some rare cases it can even beat C. But this is after billions of dollars have been thrown at trying to make Java fast.
If you intend to distribute your software (as opposed to running on your own servers), it would require all the customers to have a fancy JVM. Or buying an expensive license to be able to distribute the runtime with your software.
- markokocic 14y ago> Yes. Java is getting closer and closer to native code performance. In some rare cases it can even beat C. But this is after billions of dollars have been thrown at trying to make Java fast. Why is it a bad thing that someone was willing to pay money to make Java fast. Do you want to say that there haven't been billions of dollars in both money and man-hours thrown at trying to make C/C++ fast? There's no free performance.
- exDM69 14y ago> Why is it a bad thing that someone was willing to pay money to make Java fast. I guess there's someone who wants to pay for that. But I don't think it's money well spent. The Java bytecode is not designed for or suited to fast execution and it's a bad intermediate representation for computer programs to be compiled into native code. The Java byte code was designed to be easy to interpret and was designed at a time when a memory access was faster to execute than an ALU instruction (on cheap h/w where Java was originally intended to be run on). Those days have passed and we should move on to better intermediate representations for computer programs. Like LLVM IR.
- pjmlp 14y agoYou mean VM Kit then, with AOT compilation for Java, just like Clang but for Java. http://vmkit.llvm.org/ http://vmkit.llvm.org/
- exDM69 14y agoExcept that I don't want the Java part of it. I'd much rather just use Clang and C. VMkit is a nice effort, though. I hope it will some day power fancy new languages that have dynamic features which are not well suited for AOT compilation.
- pjmlp 14y agoWhat part did you not understand from my post? These are native code compilers without any need of extra runtime exactly like C. Just because most people only know Oracle(Sun)'s JVM, it does not mean it is the only way to execute Java code.