以 Go 語言爲例解釋什麼是僞共享以及如何解決
本文翻譯自:What’s false sharing and how to solve it (using Golang as example)譯文在解釋僞共享(false sharing)之前,有必要簡要介紹一下 CPU 架構中緩存是如何工作的。CPU 緩存中的最小單位是緩存行(cache line)(如今,CPU 中常見的緩存行大小爲 64 字節)。因此,當 CPU 從內存讀取一個變量時, ⌘ Read more

⤋ Read More