EDIT: Should have mentioned Zing instead of Azul.
It is a bit hard to search while on the move.
They make fantastic tools, but they really do only target Windows.
Some builtin features that Sun/Oracle leave for third parties.
- It always JITs. Either at runtime (JIT on load) or at installation time (NGEN).
- Windows Phone 8 .NET applications are compiled to native code, to an executable format called MDIL. Native code with symbols left for linking.
- A new JIT in the works that offers SIMD instructions
- A native compiler for static binaries based on the Visual C++ backend (.NET Native)
- Value types (In discussion for Java 9)
- Flat arrays
- Native interop (JNI sucks, Oracle also recognized this)
- Real generics.
Regarding the first issues, Java also offers them, but you have to buy a commercial JVM as the standard Oracle tooling doesn't offer such features. There is the Graal/Substracte VM at Oracle Research, but who knows when integration will happen.
Regarding the last issues, they were discussed at JVM Language Summit 2014. Some of them might be fixed in Java 9 timeframe.
http://www.oracle.com/technetwork/java/javase/community/jlss...
(I know, I should be using D, you say)
what is a flat array?
By value type, you mean assignment causes deep copy instead of reference copy?
What is the advantage of a static binary over just shipping the jvm (which you are certainly allowed to do)? I guess I could see it if you are writing end-user software, but the jvm is pretty much server-software and devtools at this point.
What do you mean it always jits? So does the jvm unless I misunderstand what you mean by jit.
simd is beginning to make its way into java, but numerics are not the jvm's strong spot. I didn't think they where for c# either. Is this incorrect?
And yeah, jni is fucking awful.
Real generics would be nice.
Thanks for your answer.
In multidimensional arrays you do one single allocation instead of n times m time k times ... allocations.
You can fake this in Java by allocating one major block and doing the math for the respective cell yourself but it is cumbersome.
> What is the advantage of a static binary over just shipping the jvm
The same as doing coding in C and similar languages. Guess one of the reasons why Java lost the desktop.
> What do you mean it always jits?
There isn't any interpretation going on. On most JVMs you need to set execution threshold to zero to achieve similar behavior.
On most JVMs, it is a two step process as they start interpreting and only hot methods (this is customizable on most) get JITted.
> simd is beginning to make its way into java
It is still not clear if it will make it into Java 9 timeframe.
> Is this incorrect?
Yes, as C# as managed to place itself as "good enough C++" on the Windows world, for many use cases.
I've shipped single jar programs -- it's pretty simple to repack everything -- and I believe (but am not 100%) that we included the jvm in there, so it can be done. At the expense of a 100+m download, but for our use case, that was not an issue.
Have you seen performance improvements from forcing always jit? I've played with similar settings and only really found them useful for benchmarking.
I'm surprised you're seeing c# for numerics on windows; I thought there wasn't much besides games that needs to be local and isn't written in c++ these days, either for performance or because the codebase is old. I work on ml programs, mostly c++ and java.
Bioinformatics
Overall I like Java quite a bit, it's the first thing I reached for when I migrated away from .NET development, but Eclipse/Java dev still doesn't feel as snappy on my Macbook Air with 4Gs of ram as dev with VSExpress 2005 was on my old Dell. Le Sigh.
(edit: JDK8 and the G1 collector have made my life a lot easier when I have to tune the JVM. I think you gotta cut it a little more slack these days.)
(I like WPF. But I'm weird.)
We even get to have the "J2EE" version of .NET with all those model view patterns.
I can't even think of a way to do it safely in Java without "BufferedBuffer" hell
Even setting aside advancement and research, it's hard to really create a real competitors to Microsoft's existing solutions even when they're terrible. NHibernate is the "best" one I can think of and it's kind of trainwreckish. Outside of that--like, NancyFx has been around a long time at this point but hasn't really made a dent, whereas the JVM application server is rapidly losing ground--and it literally cannot come soon enough for my liking--to frameworks like Dropwizard or Play. You can fight the Man on the JVM and win; I'm not sure you can do so on .NET.
That isn't to say .NET doesn't have some significant pluses. If you stay in the sandbox and can stomach having to deal with non-Unix command line tools or Cygwin (haaaa ha ha ha), it is really really nice. But the second you go off-roading, bring a helmet.