Why do you have to use both a compiler flag and a run-time flag to get multicore-support in Haskell?

前端 未结 3 2067
被撕碎了的回忆
被撕碎了的回忆 2021-02-07 04:46

The Haskell wiki shows that you need to both set a compilation flag and a run-time flag to get multi-core support. Why isn\'t using the library enough to get the correct behavio

3条回答
  •  半阙折子戏
    2021-02-07 04:49

    From GHC User guide (version 6.12.1):

    Omitting x, i.e. +RTS -N -RTS, lets the runtime choose the value of x itself based on how many processors are in your machine.

    I suppose there's no specific reason for this not to be the default, apart from authors' vision of what should defaults be. (Note that this also enables parallel GC, which maybe sometimes isn't what you wish to be by default.)

提交回复
热议问题