News for hackers. Stuff that matters.
Re:Imperative Haskell by lgas on Wednesday May 31, 2017 @03:03AM (#14450832)
I was playing around a little more and I noticed that stack sets the following ghc-options by default:

    -threaded -rtsopts -with-rtsopts=-N
which I assumed explained some of the speedup, so I disabled them and got a reduction to 99% cpu as expected, but unexpectedly the single threaded version was about twice as fast:

    % make hs
    Results: [24605537,25150983,21576960]
    make hs  3.13s user 0.07s system 99% cpu 3.211 total
Re:Imperative Haskell by sbergot on Wednesday May 31, 2017 @07:41AM (#14451699)
Haskell threaded runtime can have poorer performances than the non-threaded one on single threaded programs.
Re:Imperative Haskell by bojo on Wednesday May 31, 2017 @04:35AM (#14451100)
Depending on your problem you can actually lose performance with a multi-threaded app due to the context switching overhead.