3 ms·
In go version you'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) f
by vadiml 11y ago
In go version you'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.
After this change my results changed from:
Result: 1783293664 in 61586 ms.
to:
Result: 1783293664 in 28401 ms.