Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?


> 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...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: