On Wednesday, 6 May 2015 at 02:07:40 UTC, deadalnix wrote:
Let me tell you an actual war story of mine.

We have this program that is computationally intensive written in java. Somewhere in the core of the program, we have a LRU cache, with some entries sticking in there, and most entry getting evicted soon enough (typical pareto kind of thing).

Problem is, all these entries needs to be value types (we are in java) and, by the time things gets evicted from the LRU cache, they have moved to the old generation.

The whole damn thing generate a ton of garbage.

The obvious solution is to use value types in the cache, but that not possible. I won't go in the details, but that was a really hard problem to solve, that kept us busy for for longer then it should have because of language limitations.

Long story short: value types are useful.

That's sounds like a great story! What kind of "values" were you caching?

Reply via email to