If you can do that it makes your previous argument, caring that an interaction takes 50 cycles, basically irrelevant.
If you can do that it makes your previous argument, caring that an interaction takes 50 cycles, basically irrelevant.
If it is done as a linked list there may be good multiple insert options, but then you have a linked list and all the extra jumping around memory that involves compared to a ring buffer.
The approach used in that article is to publish the events into multi-producer/single-consumer queues. When a queue is full, then the batch can be performed under a lock to replay and catch-up the LRU. This way the lock is used to ensure single-writer, but does not suffer lock contention. The ring buffer is lock-free, but the cache itself is not. Lock-free can suffer contention or be more expensive algorithmically than if under a lock, so whichever strategy chosen requires careful consideration of the system performance.
[1] http://highscalability.com/blog/2016/1/25/design-of-a-modern...
And get better throughput.
[1] https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.15...
[2] http://ranger.uta.edu/~sjiang/pubs/papers/ding16_BP-wrapper....
I promise you that practically nobody doing it has ever heard of "BP-Wrapper", or of flat-combining.