In go version you&#x27;re using unbuffered channel,  which will cause a lot of extra goroutine swithces
please try to change line 10 to:
  rc := make(chan int, 10)
for example.<p>After this change my results changed from:
Result: 1783293664 in 61586 ms.
to:
Result: 1783293664 in 28401 ms.