3 ms·
The cost of writing data to memory is incredibly small; you'd have to be working on something like gaming engines for it to even be noticeable. Logging can als
by falcolas 6y ago
The cost of writing data to memory is incredibly small; you'd have to be working on something like gaming engines for it to even be noticeable.
Logging can also be done in a separate thread, reducing even that exceptionally minor cost.
- wsargent 6y agoCan confirm -- writing data to memory is incredibly fast. It's faster to use a lock-free queue and use CAS to insert data though: http://psy-lob-saw.blogspot.com/2016/12/linked-array-queues-part-2-spsc.html http://psy-lob-saw.blogspot.com/2016/12/linked-array-queues-... I've benchmarked code myself, and the flamegraphs will barely show the SpscArrayQueue in the profile.