on master help sign in
update README
commit4100822c84e7eb72e208cd1567c025b45927c576 authorHarendra Kumar <harendra.kumar@gmail.com> dateWed 12 Sep 2018, 16:19 (8 years ago) parent83dc30a
3 files changed+19−18
README.md+11−18 src/Streamly/Prelude.hs+3 src/Streamly/SVar.hs+5
README.md+11−18
@@ -30,7 +30,8 @@ the functionality of list transformer libraries like `pipes` or
3030[list-t](https://hackage.haskell.org/package/list-t), and also the logic
3131programming library [logict](https://hackage.haskell.org/package/logict). On
3232the concurrency side, it subsumes the functionality of the
33−[async](https://hackage.haskell.org/package/async) package. Because it supports
33+[async](https://hackage.haskell.org/package/async) package, and provides even
34+higher level concurrent composition. Because it supports
3435streaming with concurrency we can write FRP applications similar in concept to
3536[Yampa](https://hackage.haskell.org/package/Yampa) or
3637[reflex](https://hackage.haskell.org/package/reflex).
@@ -59,18 +60,6 @@ processing a million elements. The timings for streamly and vector are in the
5960
6061![Streaming Operations at a Glance](charts-0/KeyOperations-time.svg)
6162
62−For more details on streaming library ecosystem and where streamly fits in,
63−please see
64−[streaming libraries](https://github.com/composewell/streaming-benchmarks#streaming-libraries).
65−Also, see the [Comparison with Existing
66−Packages](https://hackage.haskell.org/package/streamly/docs/Streamly-Tutorial.html)
67−section in the streamly tutorial.
68−
69−For more information on streamly, see:
70−
71− * [Streamly.Tutorial](https://hackage.haskell.org/package/streamly/docs/Streamly-Tutorial.html) module in the haddock documentation for a detailed introduction
72− * [examples](https://github.com/composewell/streamly/tree/master/examples) directory in the package for some simple practical examples
73−
7463## Streaming Pipelines
7564
7665Unlike `pipes` or `conduit` and like `vector` and `streaming`, `streamly`
@@ -338,12 +327,16 @@ for a console based FRP game example and
338327[CirclingSquare.hs](https://github.com/composewell/streamly/tree/master/examples/CirclingSquare.hs)
339328for an SDL based animation example.
340329
341−## Comparison with the `async` package
330+## Further Reading
331+
332+For more information, see:
342333
343−Streamly provides higher level concurrency compared to the `async` package, it
344−can be used wherever you would want to use the `async` package. [See this
345−tutorial for a quick comparison of streamly with
346−async](https://github.com/composewell/streamly/blob/master/docs/Async.md).
334+ * [A comprehensive tutorial](https://hackage.haskell.org/package/streamly/docs/Streamly-Tutorial.html)
335+ * [Some practical examples](https://github.com/composewell/streamly/tree/master/examples)
336+ * [Comparison with other packages](https://hackage.haskell.org/package/streamly/docs/Streamly-Tutorial.html)
337+ * [Streaming benchmarks comparing streamly with other streaming libraries](https://github.com/composewell/streaming-benchmarks)
338+ * [Quick tutorial comparing streamly with the async package](https://github.com/composewell/streamly/blob/master/docs/Async.md)
339+ * [Concurrency benchmarks comparing streamly with async](https://github.com/composewell/concurrency-benchmarks)
347340
348341## Contributing
349342
src/Streamly/Prelude.hs+3
@@ -929,6 +929,9 @@ mapMaybeM f = fmap fromJust . filter isJust . mapM f
929929-- Transformation by Reordering
930930------------------------------------------------------------------------------
931931
932+-- XXX to scale this we need to use a slab allocated array backed
933+-- representation for temporary storage.
934+--
932935-- | Returns the elements of the stream in reverse order.
933936-- The stream must be finite.
934937--
src/Streamly/SVar.hs+5
@@ -338,6 +338,11 @@ data SVar t m a = SVar
338338 svarStyle :: SVarStyle
339339
340340 -- Shared output queue (events, length)
341+ -- XXX For better efficiency we can try a preallocated array type (perhaps
342+ -- something like a vector) that allows an O(1) append. That way we will
343+ -- avoid constructing and reversing the list. Possibly we can also avoid
344+ -- the GC copying overhead. When the size increases we should be able to
345+ -- allocate the array in chunks.
341346 , outputQueue :: IORef ([ChildEvent a], Int)
342347 , outputDoorBell :: MVar () -- signal the consumer about output
343348 , readOutputQ :: m [ChildEvent a]