[Haskell-cafe] GHC strange behavior

Ruslan Evdokimov ruslan.evdokimov at gmail.com
Sat Feb 16 19:41:52 EST 2008

2008/2/17, Stefan O'Rear <stefanor at cox.net>:

> This makes perfect sense - -N2 tells GHC to use two threads, and if you
> run two threads on a single-processor system it's implemented by running
> the threads alternatingly (around 100/s for modern Linux, probably
> similar for other systems).  Thus, the two evaluations never get more
> than a hundreth of a second out of step, and memory usage is still low.
> Stefan

Test on windows XP AthlonX2 4200+ 2Gb:

12328 ms

C:\imp>test +RTS -N2
5234 ms

C:\imp>test +RTS -N2
3515 ms

1st - 1 thread
2nd - 2 threads on single core (one core disabled through Task Manager)
3rd - 2 threads on different cores

More information about the Haskell-Cafe mailing list