3 ms·
I complain all the time about the memory consumption of Java software, they behave like they are the only ones running on a computer, but not the speed. The JVM
by speedgoose 6y ago
I complain all the time about the memory consumption of Java software, they behave like they are the only ones running on a computer, but not the speed. The JVM is actually pretty fast. For sure it's a bit slower than native code but if your Java code is slow, I'm sorry but it's your code and using C++, C, Rust or whatever else faster will not make your code fast.
- KronisLV 6y agoYep, here are some sources to back up the claim that Java performance is pretty okay. TechEmpower benchmarks: https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=fortune https://www.techempower.com/benchmarks/#section=data-r19&hw=... Language benchmarks game: https://benchmarksgame-team.pages.debian.net/benchmarksgame/which-programs-are-fastest.html 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-137264.html https://jaxenter.com/energy-efficient-programming-languages-...
- imtringued 6y agoMy biggest issue with the JVM is the RAM consumption. Every other language, even JS beats it. GraalVM's native image feature is the only way to fix this and that is pretty sad that it took them multiple decades to fix such a glaring flaw.
- kaba0 6y agoDid you set a heap size for your app? Because the JVM has an eager way of consuming RAM (since then it doesn’t have to do useless work with garbage collection) - and the defaults are closer to a server config.