News for hackers. Stuff that matters.
Re:Java Is Memory Efficient by sakesun on Tuesday September 01, 2026 @09:10PM (#49530517)
Java was designed to make manual memory management a non-concern. Yet, ironically, it's the runtime that require more explicit memory tuning than any others.
Re:Java Is Memory Efficient by moring on Wednesday September 02, 2026 @02:41AM (#49532556)
This does not match my experience. The amount of manual tuning needed for memory management in C/C++ (which Java was designed to improve upon) was orders of magnitude greater than with Java just to get it correct, let alone efficient in terms of memory usage and performance.
Re:Java Is Memory Efficient by gf000 on Wednesday September 02, 2026 @02:43AM (#49532574)
It absolutely doesn't need any memory tuning whatsoever. People just read 2 decades old blog posts and apply whatever random flag they see.

For 90% of workflows you don't add any command line arguments, for the remaining 10% you may specify a heap size. That's all.

Re:Java Is Memory Efficient by eerikkivistik on Wednesday September 02, 2026 @03:26AM (#49532929)
Perhaps you work on simple CRUD applications? In my experience the 90/10 are reversed.
Re:Java Is Memory Efficient by gf000 on Wednesday September 02, 2026 @01:16PM (#49539361)
What do you need it for? Which version of the JVM?
Re:Java Is Memory Efficient by eerikkivistik on Tuesday September 08, 2026 @02:32AM (#49606283)
Sure, a few examples that happen with modern JVMs (even 25). Essentially anything addressing a large amount of memory (think > 100gb). This can be databases, streaming solutions and so on, where you start tuning the GC just to have a smooth experience. Then there is the case of memory fragmentation of the heap, so you might want to switch out your GC. What else, basically any system that uses a lot of temporary memory is borked, because Java has a nasty habit of not returning unused heap to the OS by default. All in all, my point is, if you are doing anything that actually utilizes the hardware near its limits you will be tuning by quite a bit.
Re:Java Is Memory Efficient by gf000 on Tuesday September 08, 2026 @03:15AM (#49606642)
> All in all, my point is, if you are doing anything that actually utilizes the hardware near its limits you will be tuning by quite a bit.

What do you think happens in case of literally any other platform/programming language when you go near the limit? You are just either forced to change code, or.. well just put up your hand in the air, I guess and maybe buy better hardware?

Re:Java Is Memory Efficient by eerikkivistik on Wednesday September 09, 2026 @12:34PM (#49629227)
As far as I can tell we are in violent agreement. When you do complicated things you have to tune, when you don't you don't.