Commit Graph

1089 Commits

Author SHA1 Message Date
Harendra Kumar
d0ef2ba1f7 update developer doc generation 2019-07-29 08:30:36 +05:30
Harendra Kumar
c8a98dd1ed
Merge pull request #221 from neongreen/inspection-testing
Add an inspection test for #214
2019-07-28 18:47:44 +05:30
Harendra Kumar
b7d05278d4
Merge pull request #215 from composewell/string-docs
Add documentation for string functions.
2019-07-28 18:45:44 +05:30
Artyom Kazak
bebdf08464 Disable inspection testing on Windows 2019-07-28 15:53:18 +03:00
Harendra Kumar
6bde69894b
Merge pull request #220 from composewell/ghcjs-build
Conditionally compile network package for ghcjs.
2019-07-28 17:27:46 +05:30
Harendra Kumar
687fb9a283 Add "flatten" to StreamD as a faster alternative to concatMap 2019-07-28 06:43:51 +05:30
Artyom Kazak
155e6d6b0a Fix Travis 2019-07-26 19:48:39 +03:00
Artyom Kazak
e7a7801cd9 Add an inspection test for #214 2019-07-26 18:32:24 +03:00
Harendra Kumar
8552589390 Add more concatMap benchmarks
* concat pure streams
* concat n x n
* use replicate with concatMap
2019-07-26 19:18:00 +05:30
Harendra Kumar
a74914de9d
Merge pull request #219 from composewell/design1
Add guidelines for inlining
2019-07-26 19:09:11 +05:30
Pranay Sashank
330d904277 Conditionally compile network package for ghcjs. 2019-07-26 16:55:15 +05:30
Harendra Kumar
7876f59bcc
Update design/inlining.md
Co-Authored-By: Artyom Kazak <yom@artyom.me>
2019-07-26 15:18:46 +05:30
Harendra Kumar
6a806f4817 Add guidelines for inlining 2019-07-26 01:13:13 +05:30
Pranay Sashank
2681c462fe Update string docs. 2019-07-25 21:41:20 +05:30
Harendra Kumar
00c761301e
Merge pull request #214 from neongreen/sig
Get 'replicateM' to specialize
2019-07-25 15:27:41 +05:30
Pranay Sashank
20b204c53e Update docs/streamly-vs-async.md.
- runStream -> S.drain
2019-07-24 13:53:06 +05:30
Pranay Sashank
fe9b42e798 Add documentation for string functions. 2019-07-24 13:36:33 +05:30
Artyom Kazak
3d1ed1267c Get 'replicateM' to specialize 2019-07-24 00:09:50 +03:00
Harendra Kumar
f56cab7d9a mention updation of tutorial and other docs 2019-07-24 01:56:21 +05:30
Harendra Kumar
7c6eac87b0 Add INLINE pragma to replicate 2019-07-21 04:52:59 +05:30
Harendra Kumar
8a4d965a93 Add trace, tap and tee combinators 2019-06-29 23:19:15 +05:30
Harendra Kumar
67de994741 Refactor to reuse mkAsync' for mkAsync 2019-06-29 23:18:06 +05:30
Harendra Kumar
2f4f4cc175 Keep IOVec code only when dev flag is on
It requires -fobject-code with GHCi, so just disabled for now so that it is
easier to play with GHCi by default.
2019-06-29 23:15:59 +05:30
Harendra Kumar
2f31747c36 Fix commented code for drain 2019-06-28 23:20:17 +05:30
Harendra Kumar
513eb1c2bd Add cabal upload commands 2019-06-28 20:56:36 +05:30
Harendra Kumar
cecad7e924 Provide a different impl for yieldLimit case
Gives some performance boost (8.8 sec vs 7.7 sec) to the common case when there
is no yield limit.
2019-06-28 15:46:42 +05:30
Harendra Kumar
debe27702f Do not run each individual stream action with captured state
We already run the whole thread with captured monad state (in doFork). Running
with captured state in parallel stream is unnecessary. This leads to buildup of
memory on thread stack and memory keeps growing continuously. Also with the
removal of this call we are at 8 seconds vs 34 seconds in concatMapBy parallel
benchmark.
2019-06-28 13:13:45 +05:30
Harendra Kumar
90161e172e Apply static argument transformation to runOne
memory usage reduced by 7% (930 vs 870 MB) and time improved by 9% (34 sec vs
31 sec) when concating 100 concurrent threads with 500K elements in each
thread stream.
2019-06-28 11:24:01 +05:30
Harendra Kumar
b67b840556 Add config options to run benchmarks quickly 2019-06-28 03:16:46 +05:30
Harendra Kumar
d6eb138165 Add concat/append benchmark for concurrent streams
Measure space usage in interesting cases.

The motivation for these benchmarks is parallel stream consuming a lot of stack
space in concatMap case. These benchmarks will hopefully catch any such
problems in future.

These benchmarks may take a lot of time to allow memory consumption to slowly
buildup to noticeable amount in case there is a problem. Therefore they are
enabled only in dev builds. We can use `--include-first-iter`, `--min-duration
0` options in gauge to run them in reasonable time. They need to be run with
`--measure-with` option to allow isolated runs, otherwise memory measurement
won't be correct.
2019-06-28 02:54:35 +05:30
Harendra Kumar
ed7f4ab1a6 Implement bounded buffering for ParallelT streams
* Earlier ParallelT was unaffected by `maxBuffer` directive, now `maxBuffer`
  can limit the buffer of a ParallelT stream as well. When the buffer becomes
  full the producer threads block.
* ParallelT streams no longer have an unlimited buffer by default. Now the
  buffer for parallel streams is limited to 1500 by default, the same as other
  concurrent stream types.
2019-06-27 15:48:56 +05:30
Harendra Kumar
7f2bf64d3d Restrict maxThreads to maxBuffer
Currently maxThreads are independent of maxBuffer. If maxThreads are larger
than maxBuffer we may dispatch as many workers. Since we check the buffer limit
only after the worker yields a value, it may be too late and we may exceed the
buffer already. To make sure that we never exceed the buffer we restrict the
maxWorkers to maxBuffer value.

The invariant maxThreads <= maxBuffer holds.
2019-06-27 15:26:32 +05:30
Harendra Kumar
a7556e89bb Add some locking notes 2019-06-27 15:26:32 +05:30
Harendra Kumar
6fd821cedc fix cabal not finding benchmark executables 2019-06-27 15:25:20 +05:30
Harendra Kumar
e59830b999 update package installation instructions 2019-06-26 18:24:03 +05:30
Harendra Kumar
b10a2322db Add package usage instructions for cabal 2019-06-26 18:07:55 +05:30
Harendra Kumar
3ae0b40dc7 Expose postscanl' and postscanlM' 2019-06-19 21:09:05 +05:30
Harendra Kumar
24b044adfb use cabal for building benchmarks 2019-06-18 23:39:37 +05:30
Harendra Kumar
50170f39a5 Add fileio benchmark 2019-06-18 23:39:15 +05:30
Harendra Kumar
b9dbfaa4f5 rename fileio example to avoid conflict with fileio benchmark 2019-06-18 20:51:21 +05:30
Harendra Kumar
4caeaac24b Add fileio benchmark 2019-06-18 17:30:46 +05:30
Harendra Kumar
773f5a7c70 Fix a bug that caused reopening of the wrong file 2019-06-18 16:19:00 +05:30
Harendra Kumar
2bb75a083d Mention -fspec-constr-recursive ghc flag for compilation 2019-06-18 14:24:37 +05:30
Harendra Kumar
e879480a74 Allow failure for GHCJS build for now 2019-06-18 00:13:57 +05:30
Harendra Kumar
57fc883e84 put redundant import in non-windows conditional 2019-06-18 00:13:29 +05:30
Harendra Kumar
d0bf5593d2 use RawIO.write because it works for windows as well
FDIO.writeAll does not work for windows.
2019-06-17 21:06:39 +05:30
Harendra Kumar
6688d0e4c9 Disable windows raw fd IO code 2019-06-17 21:00:46 +05:30
Harendra Kumar
909d218356 update cabal-install version for coveralls build 2019-06-16 20:20:52 +05:30
Harendra Kumar
82e681e769 Expose IOVec for windows case as well 2019-06-16 20:14:13 +05:30
Harendra Kumar
cce586ad12 update CI config files with new packcheck version 2019-06-16 19:39:46 +05:30