3 ms·
This problem is inherently single-threaded. Stackless Python is single-threaded. Go distributes the goroutines over several processors using a thread pool so
by seunosewa 17y ago
This problem is inherently single-threaded. Stackless Python is single-threaded. Go distributes the goroutines over several processors using a thread pool so the performance is naturally lower for a no-op program like this one. Conclusion: inter-processor communication is expensive?
- dons 17y ago> Go distributes the goroutines over several processors using a thread pool so the performance is naturally lower for a no-op program like this one Performance is certainly worse with more cores. And you can end up with exponential slowdowns due to thread migration. The best strategy is to pin parts of the thread ring on each core. Go doesn't have a good SMP scheduler, so you see that slowdown, and the GHC team have written about the solutions. See this thread: http://www.reddit.com/r/programming/comments/a4n7s/stackless_python_outperforms_googles_go/c0ftvvj http://www.reddit.com/r/programming/comments/a4n7s/stackless...