How to make Haskell use whole processor power while compiling
Asked Answered
W

1

6

I noticed that when I do compilation, installing some module, haskell compiler uses only one processor (blue chart 1/4)? 1 of 4 on my laptop.

I've heard that Haskell Compiler is smart, so it could safe my time using all I have.

Is there a way to make it faster? Some configuration maybe.

There is a pic - processor graph is blue. Yellow - network. Red - hard-drive.

At that moment when screenshot was made it could use all processor time since it does not use either hard-drive or network.

enter image description here

Wieland answered 9/5, 2014 at 22:58 Comment(2)
Note that, as full as your memory looks, fully exploiting all cores might not be such a great idea since this tends to also cost more RAM. It might drive the compilation into swap, effectively making it substantially slower!Shuntwound
Green - memory. Light green - cached / not active memory.Wieland
B
9

You're looking for the -j flag in GHC versions 7.8.1 and higher.

Basilisk answered 9/5, 2014 at 23:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.