3Recommended GHC options are:
5 `-O2 -fspec-constr-recursive=16 -fmax-worker-args=16`
7`-fspec-constr-recursive` is needed for better stream fusion by enabling
8the `SpecConstr` optimization in more cases.
10`-fmax-worker-args` is needed for better stream fusion by enabling the
11`SpecConstr` optimization in some important cases.
13In some cases, you may need to use `-funfolding-use-threshold` to make sure
14that the combinators fuse. The default value of this option is `60`. Increasing
15this default value can be detrimental in general, therefore, increase only if
16you suspect an issue. Hopefully GHC will fix this so that it is not needed in
17future. Some known examples:
19* use a value of `75` to fuse `S.chunksOf n (A.writeN n)`.
20* use a value of `150` to fully fuse `S.splitSuffixOn`.
22At the very least `-O` compilation option is required. In some cases, the
23program may exhibit memory hog with default optimization options. For example,
24the following program, if compiled without an optimization option, is known to
28main = S.drain $ S.concatMap S.fromList $ S.repeat []
31# Multi-core Parallelism
33Concurrency without a threaded runtime may be a bit more efficient. Do not use
34threaded runtime unless you really need multi-core parallelism. To get
35multi-core parallelism use the following GHC options:
37 `-threaded -with-rtsopts "-N"`
41GHC 8.2.2 may hog memory and hang when building certain application using
42streamly (particularly the benchmark programs in the streamly package).
43Therefore we recommend avoiding using the GHC version 8.2.x.
45# Performance Optimizations
47If performance is below expectations:
49* Look for inlining functions in the fast path
50* Strictness annotations on data, specially the data used as accumulator in
51 folds and scans, can help in improving performance.
52* Strictness annotations on function arguments can help the compiler unbox
53 constructors in certain cases, improving performance.
54* Sometims using `-XStrict` extension can help improve performance, if so you
55 may be missing some strictness annotations.
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list