(no title)
vitpro2213 | 1 year ago
Also this one enqueue will be mega expensive - a clear "fat tail" in the latency histogram.
In MultiArrayQueue you keep all already enqueued material in-place, "just" allocate the bigger array, register the new diversion, enqueue the one new element - and done.
Thanks
Szpadel|1 year ago
for me it would be better to allocate new buffer but allow reading from old one until it contains data and after that dealocate it and keep only new one in use
zamalek|1 year ago
jauntywundrkind|1 year ago
One other thing I want to shout out, I saw what I thought was a really neat multicast ring buffer the other day where the author has an atomic for each element, rather than the typical reader/writer atomics. The promise was having much less contention on any given atomic, in most cases. https://github.com/rezabrizi/SPMC-Queue https://news.ycombinator.com/item?id=40410172