on master help sign in
Update to require `-O` option at the very least
commite57ed670898ebb729e8442547e93625ee41911c5 authorHarendra Kumar <harendra.kumar@gmail.com> dateSat 15 Jun 2019, 09:03 (7 years ago) parent005b4b7
1 file changed+27−6
docs/Build.md+27−6
docs/Build.md+27−6
@@ -1,10 +1,31 @@
1−# GHC Options
1+# Compilation Options
22
3−* Recommended compiler options are: `-O2 -fspec-constr-recursive=10`
4−* To make use of multiple cores, use: `-threaded -with-rtsopts "-N"`
3+Recommended GHC options are:
54
6−# Known Issues
5+ `-O2 -fspec-constr-recursive=10`
6+
7+At the very least `-O` compilation option is required. In some cases, the
8+program may exhibit memory hog with default optimization options. For example,
9+the following program, if compiled without an optimization option, is known to
10+hog memory:
11+
12+```
13+main = S.drain $ S.concatMap S.fromList $ S.repeat []
14+```
15+
16+The `-fspec-constr-recursive=10` option may not be necessary in most cases but
17+may help boost performance in some cases.
18+
19+# Multi-core Parallelism
20+
21+Concurrency without a threaded runtime may be a bit more efficient. Do not use
22+threaded runtime unless you really need multi-core parallelism. To get
23+multi-core parallelism use the following GHC options:
24+
25+ `-threaded -with-rtsopts "-N"`
26+
27+# Compiler Versions
728
829GHC 8.2.2 may hog memory and hang when building certain application using
9−streamly (particularly the streamly benchmarks). Therefore we recommend
10−avoiding using the GHC version 8.2.x.
30+streamly (particularly the benchmark programs in the streamly package).
31+Therefore we recommend avoiding using the GHC version 8.2.x.