3 ms·
Depending on the task Java is actually faster than C++ at times. Garbage Collection, when done right, can for example be faster than manual memory management. A
by t0mas88 13y ago
Depending on the task Java is actually faster than C++ at times. Garbage Collection, when done right, can for example be faster than manual memory management. And a JIT compiler can do optimizations that a normal C++ compiler could only do with help from the developer.
There is a reason many of these kind of systems are written in JVM based languages. Examples: Hadoop and all of its siblings, Cassandra, Storm, Kafka. So either all of those people in successful projects make "questionable decisions" or your knowledge of Java/JVM performance has been outdated by the new developments of the past few years...
- hatred 13y agoI don't particularly agree with the reasons mentioned by you. Most of the existing systems are JVM based due to the excellent tooling/supporting libraries around Java and its ease of use. This enables you to focus more on building the system rather then focus on micro-optimizations around C++.
- shmerl 13y agoNot sure about the reason for Hadoop to be in Java. Google's map reduce system which inspired Hadoop was written in C++ for good reasons as well. Systems you mentioned are written in Java I assume, because it's easier for those projects to find developers. In the future this will change, with languages like Rust emerging as better C++ alternatives.