147
edits
Changes
→Parallel
As you can see only one core is work to compute the value of Pi - '''CPU8 @ 100%'''<br/>
[[Image:Cpu.PNG|alt=Monte Carlo Simulations]]
===== Pi - Parallel =====
<syntaxhighlight lang="go">
func MultiPIParallelPI(samples int) float64 {
runtime.GOMAXPROCS(runtime.NumCPU())
}
</syntaxhighlight>
===== Parallel execution CPU profile =====
As you can see all cores are working to compute the value of Pi - '''CPU1-8 @ 100%'''<br/>