3 ms·
That is the JVM startup time. If you allow the vm to warm up and and JIT to kick in, you'll see significant gains.
by ch4s3 11y ago
That is the JVM startup time. If you allow the vm to warm up and and JIT to kick in, you'll see significant gains.
- omaranto 11y agoThe JVM startup time is very small nowadays (seriously, write a Hello World! class in Java to test it if you don't believe me). The culprit is probably JRuby's startup time (and maybe the Truffle + Graal version of JRuby is even slower to startup than regular JRuby).
- ch4s3 11y agoYeah, I'm oversimplifying. However, compared to MRI, the JVM starts up quite slowly. Pile on JRuby et al and you end up with an even slower time to go. I think the JRuby people have been very focused on feature parity, interop, and bug fixes so I'm not sure they've prioritized startup time. For now, I'm happy with that, I don't restart my app that often, basically only on deploys.
- jordanthoms 11y agoStartup is slow right now, but there is a project underway at Oracle Labs which will reduce it to a similar level as MRI.
- mike_hearn 11y agoJVM hello world can be about 50 milliseconds. The issue is the Graal/JRuby overhead. Bear in mind that Graal is a JIT compiler that is itself written in Java. So it has to compile itself before it gets fast at compiling anything else! There is an AOT mode being worked on that should solve that, but it's not open source.