3 ms·
Comparing Go and Haskell : http://www.reddit.com/r/programming/comments/a4n7s/stackless_python_outperforms_googles_go/c0ftumi http://www.reddit.com/r/programmin
by dons 17y ago
Comparing Go and Haskell : http://www.reddit.com/r/programming/comments/a4n7s/stackless_python_outperforms_googles_go/c0ftumi http://www.reddit.com/r/programming/comments/a4n7s/stackless...
This is all about how cheap threads are.
Go is about twice as slow on this benchmark, and doesn't scale past 400k threads. GHC 6.12 goes to >3 million threads (limited by available ram at that point).
- jrockway 17y agoI have done a similar benchmark; it is actually the MVars that kill you with respect to memory. If you can omit them, you can do way more than 3 million threads. (I have not had enough coffee today, so I can't say how useful this setup would be. I have done threads-without-mvars for a TCP server, but my OS refused to give me any more than 300,000 pipes. Disappointing.)
- dons 17y ago> If you can omit them, you can do way more than 3 million threads. Via IORefs? Or?
- vegai 17y agoThis is as flawed as the stackless python guy's tests, aren't they? The haskell program's threads can block other threads (unless you build with -threaded, which will change the results surely).