Hacker News new | ask | show | jobs
by raverbashing 2608 days ago
Whatever the cost in C, Haskell is incurring the same cost, unless it is using 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)

1 comments

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.