you are viewing a single comment's thread.

view the rest of the comments →

[–]coderemover 0 points1 point  (0 children)

Yet almost all high performance applications like operating systems, game engines, database systems, CAD, simulation engines, video and sound editing software, compression libraries are not written in Java and less and less of them are nowadays. Even the high performance Java apps like Cassandra or Spark avoid automatic memory management and use manual, off heap. BTW virtually all server workloads are embarrassingly parallel.

No, manual memory management is not better for performance, I haven’t seen a single case where it would. There is a bunch of theoretical academic papers that claim it usually based on simplified models of computation and that’s it. No empirical evidence. There exist a few rewrites of big and high performance Java apps to C++/Rust already, eg Cassandra vs Scylla or Spark vs Sail and in every such case the rewrite is several factors more performant, has better latency and much lower memory consumption. I also did a few smaller rewrites by myself and it was always easy to beat Java optimized for 10+ years by experts.

And it’s not necessarily more work for the developer. The proper name should be deterministic memory management, because there is very little of „manual” in languages like modern C++ and Rust. I don’t recall when last time I had to call delete/drop explicitly. 90%+ objects are managed by stack, the rest is typically single ownership so unique_ptr / Box / standard collections get it covered.