3 ms·
Ive always wondered why java starts so slow. A simple hello world takes a second or so. Most interpreted languages do a lot better. Once it has warmed up, it
by hyperman1 8y ago
Ive always wondered why java starts so slow. A simple hello world takes a second or so. Most interpreted languages do a lot better.
Once it has warmed up, it's close to C however.
- kkarakk 8y ago>Once it has warmed up that's the problem, a lot of workflows even on really complex applns like photoshop are firing up a project for a couple of minutes to get some output or correct something. enough time is wasted warming up that people who can afford it just leave the applications running. i just keep whatever VS project i'm working on running for eg coz the startup times are painful and i have RAM to spare
- bostik 8y agoInterestingly enough, since we have Qt mentioned in this thread... Somewhere between 4.8 and 5.1 (I can't remember exactly when), QtWebKit introduced a compile-time macro-assembler setup. This was used to generate a "first pass" product of the JIT engine output, to reduce the JavaScript engine warmup time.[ß] This was at a time when I had already wondered aloud, on several occasions, how long it would take for browser vendors to allow downloading precompiled JIT blobs for speeding up the most expensive parts of whatever they wanted their visitors to run. This never happened. The world hopped over the fledgling JS-AOT craze and came up with WebAssembly instead. ß: the construction also introduced Ruby as a build requirement, because of course the macro-assembler generation was done with Ruby.
- pjmlp 8y agoA simple hello world takes about 262ms on Windows 10 with Java 11. Which can be further reduced by making use of AOT compiler, or SubstrateVM. Additionally, Java always enjoyed the ability to AOT compile to native code, even though it was mostly available via third party commercial JDKs, or gcj for the adventurous ones.