3 ms·
I remember taking an excellent multicore class in college. We studied all sorts of non-blocking data structures and fancy locks with different properties, trans
by bloppe 11mo ago
I remember taking an excellent multicore class in college. We studied all sorts of non-blocking data structures and fancy locks with different properties, transactions, etc. Then toward the end, the professor mentioned in a rather offhand way one day something along the lines of "90% of the time you're going to get the best performance with a simple mutex".
I forgot how to implement all those fancy patterns, but I remember the sense of paranoia that class instilled in me. I guess that was the point.
- yencabulator 11mo agoEven worse, cachelines are essentially RWLocked for you by the CPU cores. It's always mutexes underneath, no matter what you do. https://en.wikipedia.org/wiki/MESI_protocol https://en.wikipedia.org/wiki/MESI_protocol