title: Go-lang Testing, What is the meaning of Parallel Setting on Benchmark?
body: <p>In <a href="https://golang.org/pkg/testing/" rel="nofollow">https://golang.org/pkg/testing/</a> described that we can use <code>testing.B.RunParallel()</code> function to run benchmark in a <em>parallel setting</em>. I tried to write simple testing code:</p>
  
  <pre><code>func BenchmarkFunctionSome(b *testing.B) {
  
      for i := 0; i &lt; b.N; i++ {
          SomeFunction()
      }
  }
  </code></pre>
  
  <p>and then i changed it to use <code>RunParallel()</code></p>
  
  <pre><code>func BenchmarkFunctionSome(b *testing.B) {
  
      b.RunParallel(func(pb *testing.PB) {
          for pb.Next() {
              SomeFunction()
          }
      })
  }
  </code></pre>
  
  <p>And the one which used <code>RunParallel()</code> is slower than the first benchmark. </p>
  
  <p>Actually what is the meaning of <em>parallel setting</em> in benchmarking? Why it became slower if i used <code>RunParallel()</code> ?</p>