Re:Beating Decades of Optimized C with 80 Lines of Haskell
by pcstl on Wednesday October 16, 2019 @10:24AM
(#21270648)
Haskell does use green threads. The thing is, Haskell code is managed by a Haskell runtime, and each runtime manages a single (processor) thread. So the usual parallelism model for Haskell is to spawn a runtime for each processor core and then let each runtime manage its own green threads.
(You could use green threads in C - or something similar, though to be honest counting words in a file is a bit of an annoying problem for parallelism)