-
Notifications
You must be signed in to change notification settings - Fork 154
Improve src/comp
build time
#22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
@christiaanb The GHC build paralelization won't necessarily lead to a linear build time improvement, see https://gitlab.haskell.org/ghc/ghc/issues/9221 [edit] but you're right, that's another improvement lead, it does not seem to be used ATM. |
@NinjaTrappeur, it's true that ghc --make -jN won't lead to linear speedups, but in practice it does make comp build substantially faster. I tried -j6 (because I've a 6 core machine) and at times it did sustain 600% CPU usage. |
Another note on this: GHC 8.10.1 has some substantial compile-time performance improvements in pattern matching exhaustiveness checking, and this speeds up the compilation time of a few of our slowest compiler modules quite a bit, which should help reduce the "long tail" and improve overall parallelism. |
Building
src/comp
takes about 20 minutes on my beefy machine.This long build time is mostly due to the fact
GHC
builds the whole 229 targets in a single core, hence not leveraging parallel nature of modern CPUs.One way to improve this situation would be to divide this massive 229 targets package into several smaller independent libs, allowing a potential Haskell-specific build tool (cabal? stack?) to parallelize a bit more the overall build.
The solution to this will mostly depend on the build system you're (ie. ppl working full-time on this) envisioning.
Do you plan to keep this makefile + bare ghc custom build system or move to a Haskell-specific build tool for the Haskell bits?
The text was updated successfully, but these errors were encountered: