News for hackers. Stuff that matters.
Re:The State of Caching in Go by scottlamb on Monday March 11, 2019 @01:26PM (#19360821)
You're probably imagining an async, thread-per-core model. One cache per thread might be reasonable then (although having more, smaller caches decreases hit rate, so might fail their requirement #5).

Go programs are written in a synchronous, thread-per-request model. You'd end up with _tons_ of small, very cold caches and a miserable hit rate.

You could approximate the former in Go by just having an array of N caches and picking from them randomly. This is similar to their "lock striping" with less contention (no stripe is a hot spot) but a lower hit rate.

Re:The State of Caching in Go by jadbox on Monday March 11, 2019 @05:44PM (#19363142)
This was wonderfully simple and concise. Thank you.