3 ms·
> While it's true the JVM is very performant, its performance actually comes at a cost: it has a JIT, Garbage Collector, a whole lot of machinery for Threads/Vi
by andsoitis 3y ago
> While it's true the JVM is very performant, its performance actually comes at a cost: it has a JIT, Garbage Collector, a whole lot of machinery for Threads/VirtualThreads, JMX etc. all of which comes at a cost... thanks to multicore processors and lots and lots of RAM being available, this translates in really fast performance for Java applications... so that cost may be advantageous to you.
Here you say “it comes at a cost” twice, but you don’t say what the cost is! Or am I missing something?
- brabel 3y agoThe cost is on the things mentioned themselves: JIT is not free at all, it may take more CPU power than your actual application during some period! You can actually tell the JVM to not JIT... try that and see just how slow your code runs... it may give you an idea of how much it costs in terms of energy as well if you're able to measure that (I don't know how much that cost would look like, to be honest, I can only imagine it's a significant proportion of the total).
- pjmlp 3y agoOr maybe AOT compile, there are two free beer options now, or make use of JIT caches, there are also a couple of implementationst that do it. That is the beauty of languages with multiple implementations.