3 ms·
Currently it does better escape analysis than the CLR is capable of, specially if using specific JVMs like GraalVM, Azul, as Java enjoys choice in JVM implement
by pjmlp 2y ago
Currently it does better escape analysis than the CLR is capable of, specially if using specific JVMs like GraalVM, Azul, as Java enjoys choice in JVM implementations. Apparently .NET 9 will have better escape analysis.
Additionally, there is the Project Valhala, whose goal is to add value types to Java, and there are now the first set of early access releases,
https://jdk.java.net/valhalla/ https://jdk.java.net/valhalla/
It has taken a while (about 10 years now) to get right, because they want to keep all existing ecosystem running on top of a Valhala improved JVM in a transparent way, and adding value types without changing the Java ABI from all stuff on Maven Central and private repos, is an herculean task.
Ideally Java's should have taken into account systems languages with GC that predated it, given the quoted influences on its design, better latter than never I guess.