On Wednesday, 6 May 2015 at 18:05:57 UTC, deadalnix wrote:
Without going into the details, we had entries in a DB, counting in the millions in the working set. Some of them where hammered heavily, most of them were only needed an handful of time. Problem is, there was no way upfront to know which ones, so we add there entries in a local cache, so we can find the heavily used ones in the cache, and fallback on the DB for the less commonly used ones.

OK, so here the advantages of value vs ref types had to do "only" with allocation issues, and not (also) any advantages in how the values/objects were used per se. So, one could argue that this problem could also be solved through richer memory allocation primitives, without having to have value types?

BTW, given the GC behaviour you described, weak references wouldn't help, would they?

Reply via email to