by MaoTheMeow · 5y ago · 0 comments
At the language/runtime level Java has been faster than anything else we have used on the Web with huge success (faster than PHP, Ruby/Rails, Python, Node, for example) even since 2000, and is as fast or faster than Go. It's also used in HFT - where ultimate speed means a lot.
Seriously, your argument sounds like the first year CS student argument of yore, where they hear that assembly is faster, and want to rewrite everything in assembly (fortunately today's first year CS students are more well informed).
TechEmpower benchmarks: https://www.techempower.com/benchmarks/#section=data-r19&hw=...
Language benchmarks game: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
And just because i found it pretty interesting, here's a summary of a study that not only measures memory consumption and execution time, but also how much energy certain languages required: https://jaxenter.com/energy-efficient-programming-languages-...
Lambda instances run really well with JVMs(the whole COW memory architecture)... and even CLIs run well enough.
I actually like Java and the JVM but if AOT compilation and efficient memory usage is what you want Java is definitely not the language to use.
Sure... IntelliJ IDEA startup isn't instant. Atom's startup isn't instant. QT Creator's startup isn't instant. GIMP starts in a few seconds... etc.
However, it's all besides the point because this tool takes Java (JVM) bytecode and translates it to WebAssembly, there's no JVM involved for end users at any point.
* Faster startup
* Better Lighthouse score
* Less code
See for yourself: https://renato.athaydes.com/posts/comparing-jvm-alternatives...
I do sometimes use Go for its contiguous memory layout and await JEP 169: Value Objects from Project Valhalla.
Part of the problem is that those also happen to be the frameworks that the vast majority of the community uses.
The Java zealots also tend to ignore all of the problems associated with AOT Java compilers and the fact that it will most likely be a few years before value objects are finalized and in a released version of Java. Even then, a ton of Java developers won't be able to use any features beyond Java 8 or 11 since a lot of companies don't want to give up the ability to easily use their libraries on Android.