Re:For Better Computing, Liberate CPUs from Garbage Collection
by bunderbunder on Thursday May 09, 2019 @09:51AM
(#19868258)
FWIW, one mitigating factor is that GC isn't the only approach that wastes memory. You can also end up with memory waste in manual memory management. Due to heap fragmentation, for example, or retaining objects for longer than necessary due to programmer caution or error. I don't (personally) dare estimate their relative sizes, because I'm guessing a huge, perhaps dominant, share of differences in memory usage across languages is driven by features other than GC. Dynamic typing, for example.
Re:For Better Computing, Liberate CPUs from Garbage Collection
by pron on Thursday May 09, 2019 @05:47AM
(#19866727)
I didn't say it's free, only that it's relatively cheap. That RAM can simply be used for caching is incorrect, though. There are very-non-neglible costs to maintaining caches in distributed systems.
Re:For Better Computing, Liberate CPUs from Garbage Collection
by benchaney on Thursday May 09, 2019 @10:57AM
(#19868863)
It’s not clear what you mean by a distributed system in this context, but RAM is used for caching, costs or no.
Re:For Better Computing, Liberate CPUs from Garbage Collection
by pron on Thursday May 09, 2019 @01:17PM
(#19870143)
My point is that you can't increase the cache size indefinitely to get performance improvements, because you also have to handle cache invalidation. There is an optimal working set.
Re:For Better Computing, Liberate CPUs from Garbage Collection
by imtringued on Thursday May 09, 2019 @05:25AM
(#19866647)
Using RAM for "caching" sounds extremely wasteful. There could be applications that want to use it for something more useful than a 1% performance improvement.
Re:For Better Computing, Liberate CPUs from Garbage Collection
by benchaney on Thursday May 09, 2019 @10:55AM
(#19868838)
Caching is way more impactful than a 1% speed up. It is hard to know exactly, because it is impossible to disable on most modern operating systems, but I wouldn’t be surprised if it were an order of magnitude improvement in some situations.
By the way, caching doesn’t prevent RAM for being used by applications. If an application wants more memory, the os can always just evict some of the cache.
Mind you, I think GC is great, but saying that RAM is free is misguided.