3 ms·
Sorry if I missed it, but does Otter do anything special to limit GC-impact when caching lots of references? That's the main selling point for bigcache and free
by coxley 3y ago
Sorry if I missed it, but does Otter do anything special to limit GC-impact when caching lots of references? That's the main selling point for bigcache and freecache.
- maypok86 3y agoNo, and it's not planned (otter tries to avoid additional pressure on gc if possible, but that's not always possible). And I'm extremely frustrated that I had to include bigcache and fastcache in these benchmarks, since many people don't know the differences at all and just focus on performance and other metrics. Especially since bigcache and fastcache will only have an advantage when storing a huge number of items (well over 10 million). So I'll probably just add a P.S. in the README about it.
- coxley 3y agoYeah, they're fundamentally solving different problems. I was confused to see it benchmarking against them in the first place. The number of items isn't the best metric alone, making it harder to demonstrate in a benchmark. I've reaped benefits from bigcache with ~600k-900k items — but there's a lot of eviction, each item is a pointer and can have a bunch of nested references itself. (protobufs)