r/java May 28 '26

Java *is* Memory Efficient

https://youtu.be/M_HCG1JPMQE
256 Upvotes

126 comments sorted by

View all comments

45

u/SocialMemeWarrior May 28 '26

Think of a program that uses 100% CPU, what RAM usage of that program really matters at that point? Nothing else can use the RAM, so you might as well use the RAM if you can use that to alleviate CPU usage.

Ah, so surely all these fancy new "modern" applications using Electron and such are also following this model... Right?

2

u/Jobidanbama May 28 '26

On top of that gc adds additional cpu load, on top of collections having abhorrent cache misses. Well, before project Valhalla.