profiling/performance/cpu-cache #1480
Replies: 1 comment
-
伪共享问题:可以通过repr来让结构体对齐CPU缓存行的大小,使同一个结构体需要被不同线程独立访问的两个字段能够被加载到不同的CPU缓存行里,这样在写入其中一个字段的时候,就不会因为缓存行被修改导致另一个字段不能被其他线程访问。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
profiling/performance/cpu-cache
https://course.rs/profiling/performance/cpu-cache.html
Beta Was this translation helpful? Give feedback.
All reactions