Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How to treat Java-phobia is a question for medicine professionals, not to IT professionals.

Java is the most performant runtime outside of C/C++/Rust. It is a first choice for any project.



Well, give me a real world software example (so not a hello world thing) I can download and test and compare. I have dev & devops experience with Java, so let's take something that's used a lot; Zookeeper; Clickhouse ported it to C++ for a reason; the original sucks resources, CH Keeper you don't even notice. Maybe you will say it's written badly, but if a Apache posterchild is written badly, what does that say? Same for Apache Cassandra; even starting it for dev is a crime, let alone use it unless you have many nodes. Scylla, the C++ implementation, runs circles around a cluster of it on one box. But again, you might say it was badly done. ElasticSearch... Best not mentioned as it's a very well known resource hog vs native implementations search engines. As others said; anything Apache Spring for any real life application.

So what's a good example so I can compare it to a non Java version?


Just starting up the trivial Spring application I work on takes multiple seconds. Firing up other services for an integration test can take 30+ seconds. It's ridiculous.

The latency makes integration testing unnecessarily tedious. Don't even get me started on Maven -- dev tooling has to reimplement the build system rather than invoking it because the performance is so poor.


> Java is the most performant runtime outside of C/C++/Rust.

Add Go to that list. Or any popular compiled language for that matter.


Java faster than Go and has much more advanced GC.


Is it actually, in practical applications? Just firing up the JVM can take seconds, while Go is often used for CLI programs that only run for milliseconds.


Depends on the performance metrics you care about, and what the application actually does.

JavaScript can be faster in some tasks. Even if JS is 2x slower in another task, it uses 3x less memory than Java.

Which costs more, double CPU time or triple memory requirement?


Can you how me some evidence that Java uses 3x the memory? Sure OO heap spam with Java is certainty possible, but the same code written the same way in both languages wont have that much memory difference.



That just notes the max amount of memory used, but not the actual memory it needs. If Java has memory available it makes sense that it uses it instead of spending time cleaning up unused objects.

In addition I have a feeling that these benchmarks are comparing short lived processes. Java does take a bit longer than some other languages to start unless you use native. But that doesn't matter much when you are running long lived services.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: