mirror of
https://github.com/teivah/100-go-mistakes.git
synced 2026-06-24 02:16:55 +08:00
Merge 847a886aad into c13d0b4807
This commit is contained in:
commit
9a52bc75fb
1 changed files with 1 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ Now, let’s assume that the machine contains two cores. In most cases, we shoul
|
||||||
|
|
||||||
<figure markdown>
|
<figure markdown>
|
||||||

|

|
||||||
<figcaption>Each block is copied to a cache line on both code 0 and core 1.</figcaption>
|
<figcaption>Each block is copied to a cache line on both core 0 and core 1.</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
Both cache lines are replicated because L1D (L1 data) is per core. Recall that in our example, each goroutine updates its own variable: `sumA` on one side, and `sumB` on the other side:
|
Both cache lines are replicated because L1D (L1 data) is per core. Recall that in our example, each goroutine updates its own variable: `sumA` on one side, and `sumB` on the other side:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue