title: Merge sort with goroutines vs normal Mergesort
body: <p>I am wrote two versions of mergesort in Go. One with goroutines and the other one without. I am comparing the performance of each and I keep seeing</p>
  
  <p><a href="https://github.com/denniss/goplayground/blob/master/src/example/sort.go#L69" rel="nofollow">https://github.com/denniss/goplayground/blob/master/src/example/sort.go#L69</a></p>
  
  <p>That's the one using goroutines. And this is the one without</p>
  
  <p><a href="https://github.com/denniss/goplayground/blob/master/src/example/sort.go#L8" rel="nofollow">https://github.com/denniss/goplayground/blob/master/src/example/sort.go#L8</a></p>
  
  <p>I have been trying to figure out why the goroutine implementation performs much worse than the one without. This is the number that I see locally</p>
  
  <pre><code> go run src/main.go
  [5 4 3 2 1]
  Normal Mergesort
  [1 2 3 4 5]
  Time:  724
  Mergesort with Goroutines
  [1 2 3 4 5]
  Time:  26690
  </code></pre>
  
  <p>Yet I still have not been able to figure out why. Wondering if you guys can give me suggestions or ideas on what to do/look at. It seems to me that the implementation with goroutines should perform at least somewhat better. I say so mainly, because of the following lines</p>
  
  <pre><code>go MergeSortAsync(numbers[0:m], lchan)
  go MergeSortAsync(numbers[m:l], rchan)
  </code></pre>