2 ms·
Well, caching is a thing that shouldn't be done "just because" but after some analysis that says it's worth it. And as MaulingMonkey said, a cache doesn't need
by Jtsummers 6y ago
Well, caching is a thing that shouldn't be done "just because" but after some analysis that says it's worth it. And as MaulingMonkey said, a cache doesn't need to keep everything, just enough things to improve performance. And if the cache is costing you performance versus recomputation, then don't do it. I mean, just like anything else in life, if it hurts don't do it. If it costs you performance in a way that you care about, use an alternative.