on 8ecf96a help sign in
streamly/docs/Build.md
31 lines 1.0 kB history raw
1# Compilation Options
3Recommended GHC options are:
5 `-O2 -fspec-constr-recursive=10`
7At the very least `-O` compilation option is required. In some cases, the
8program may exhibit memory hog with default optimization options. For example,
9the following program, if compiled without an optimization option, is known to
10hog memory:
12```
13main = S.drain $ S.concatMap S.fromList $ S.repeat []
14```
16The `-fspec-constr-recursive=10` option may not be necessary in most cases but
17may help boost performance in some cases.
19# Multi-core Parallelism
21Concurrency without a threaded runtime may be a bit more efficient. Do not use
22threaded runtime unless you really need multi-core parallelism. To get
23multi-core parallelism use the following GHC options:
25 `-threaded -with-rtsopts "-N"`
27# Compiler Versions
29GHC 8.2.2 may hog memory and hang when building certain application using
30streamly (particularly the benchmark programs in the streamly package).
31Therefore we recommend avoiding using the GHC version 8.2.x.