4 ms·
Java is memory efficient [audio]
- winstonwinston 28d agoNo memory ever wasted, consumes all of it. But this does not seem to be the case anymore. Today I see that eclipse IDE is more memory friendly than Chrome.
- pestatije 1mo agoso its not memory efficient then...and nowadays the bottleneck is in memory access not cpu cycles, so the claim more memory use speeds up compute is very doubtful
- gf000 1mo agoIt doesn't use more memory (at least not due to GC itself), it wastes some memory that it won't touch again unless absolutely necessary.
- indolering 1mo agoFor a definition of "efficient" that isn't shared by anyone else. This isn't a new rationale either, but a well known trade-off involved with JIT compilation and garbage collection. It's the reason Chrome "hogs" memory and Firefox is perceived as slow: they make different resource usage tradeoffs. It will be interesting to see if the current memory crunch will impact this calculus going forward.
- himata4113 1mo agoFirefox uses more memory than chrome in all my tests when I was using it for VNC (x11).
- TexanFeller 1mo agoFF seems to use less RAM than Chrome for my 100+ open tabs these days. It’s just as fast for 99% of sites and surprisingly even compatibility is often better. Half the time when my wife encounters a broken webapp in Chrome it works fine when I have her try in FF.
- himata4113 1mo agothat seems kind of irrelevant since that's just based on how aggressive backgrounding is no?
- njitbew 1mo ago> But what's the point in leaving available memory on the table if using it makes your program run faster? Efficient use of that resource wouldn't be to leave it untapped but to use it to speed up the program. What’s the point of having a host with available memory? In today’s clouds, couldn’t you just downsize the host, and save on cost?
- nitwit005 1mo agoI agree with all the general principles, but the details of Java do matter here. There is a reason they're working hard on Project Valhalla: https://openjdk.org/projects/valhalla/ https://openjdk.org/projects/valhalla/
- yomismoaqui 1mo ago- War is peace - Ignorance is strength - Java is memory efficient
- sakesun 1mo agoJava 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.
- moring 1mo agoThis 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.
- joas_coder 22d ago[dead]
- gf000 1mo agoIt 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.
- eerikkivistik 1mo agoPerhaps you work on simple CRUD applications? In my experience the 90/10 are reversed.
- gf000 1mo agoWhat do you need it for? Which version of the JVM?
- eerikkivistik 24d agoSure, 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.
- maxlin 1mo agoDrift cars make efficient use of the whole width of the road, too.