3 ms·
JVM startup is really painful for short to medium time running apps, this is the niche we’re trying to address.
by densh 9y ago
JVM startup is really painful for short to medium time running apps, this is the niche we’re trying to address.
- nerdponx 9y agoI meant, "compile bytecode to machine code." The fact that nobody does it is a sign that it's not a good idea. I guess I was just wondering why.
- densh 9y agoScala is a relatively simple language in the end of the compiler pipeline. We just take lowered ASTs and emit our SSA representation from there because it’s easy it to implement it this way. You can totally do something similar from the bytecode.
- rpeden 9y agoExcelsior JET does it, and it works Scala. So you can already compile JVM targeted Scala to native code that way if you want to. JET is fairly expensive, though.
- pjmlp 9y agoLots of people do it. Besides ExcelsiorJET named in a sibling answer, the JDKs from Aicas, IBM, PTC, STMicroelectronics, Google with their ART implementation and a few smaller vendors for the embedded market. Also Oracle just added initial AOT on Java 9, with plans to extend it to other platforms, and eventually (long term plan) rewrite everything in Java as part of Project Metropolis. Oracle also had AOT compilers before Sun's acquisition, like JServe and JRockit. Why does it seem no one does it? Sun was religiously against AOT, leaving it to third party commercial vendors. And since the rise of FOSS most developers think it is outrageous to pay for compilers, only Fortune 500s buy such compilers.
- nerdponx 9y agoAre they all proprietary/closed-source? When I was first learning about Clojure I really wanted a native JVM compiler, but as a hobbyist I was not about to go all-in on an enterprise compiler. The only FOSS solution I found was GCJ. That, and "the JVM startup is slow!" seems to be a popular argument against Clojure and Scala here on the Intertubes.
- pacala 9y agoHow about generating .so, callable from other environments, for example CPython?
- densh 9y agoThis is on our roadmap, stay tuned.