Commit Graph

557 Commits

Author SHA1 Message Date
Ranjeet Ranjan
ec760805c9
Modularize test cases (#1707)
* Modularize test cases

* Make it build with test-core flag

And several other changes.

Co-authored-by: Harendra Kumar <harendra@composewell.com>
2022-08-20 00:45:57 +05:30
Ranjeet Kumar Ranjan
18a226b9f0 Array.Foreign -> Array.Unboxed in tests and benchmarks & intenals
Co-authored-by: Ranjeet <ranjeet@composewell.com>
2022-08-17 15:09:42 +05:30
Harendra Kumar
98d3ea9d27 Add stream generation functions to Data.Stream 2022-08-09 01:07:40 +05:30
Harendra Kumar
9ed94a6a09 Implement many2, map2
* crossWith and many can be implemented in terms of many2
* rename mapmWithInput to mapM2
* add map2
2022-08-07 13:25:40 +05:30
Harendra Kumar
bfb1624a57 Add more Prelude.Serial benchmarks to Data.Stream
And refactor for simplification and code-reuse.
2022-08-06 19:59:01 +05:30
Ranjeet Kumar Ranjan
8fbc085ef4 Move Prelude.Serial benchmarks to Data.Stream 2022-08-06 16:43:53 +05:30
Ranjeet Kumar Ranjan
2e21c3a76f Rename Storable constraint to Unboxed 2022-08-06 13:23:10 +05:30
Ranjeet Kumar Ranjan
26b78c6e89 Deprecate Streamly.Data.Array.Foreign module
Rename it to Streamly.Data.Array.Unboxed
2022-08-06 00:38:23 +05:30
Harendra Kumar
1cd4379d01 Remove dependency on hashable/unordered-containers 2022-08-02 14:35:49 +05:30
Adithya Kumar
4015d54128 Remove prim arrays and all related code 2022-07-31 02:43:44 +05:30
Adithya Kumar
3811e683ce Improve array combinators to work with unpinned arrays 2022-07-27 17:24:59 +05:30
Ranjeet Kumar Ranjan
eb586c081c Implement SerialT in terms of Stream 2022-07-27 15:53:08 +05:30
Harendra Kumar
c366e2d5e2 Use unfolds in all stream generation ops
Based on a build flag. We want to benchmark how these operations perform
when unfolds are used. This is to investigate if we can replace these
ops with just unfolds or implement these in terms of unfolds to improve
modularity.

Increase memory for Split benchmarks for use-unfolds flag.
2022-07-19 02:45:34 +05:30
Adithya Kumar
6273643c2d Add benchmarks for unboxed ring array 2022-07-11 18:51:43 +05:30
Ranjeet Kumar Ranjan
cdfda9b500 Change pollCount signature 2022-07-04 18:04:52 +05:30
Ranjeet Kumar Ranjan
8ac1ad15c2 Implement nub as Fold 2022-07-04 17:55:33 +05:30
Adithya Kumar
adc2e75b5d Abstract out Unboxing helpers and comment out IOVec code 2022-06-23 16:09:57 +05:30
Adithya Kumar
0d5a96eacc Improve mutable foreign array benchmarks 2022-06-11 19:22:07 +05:30
Adithya Kumar
0d2ce6ca76 Deprecate variance and stdDev in folds 2022-06-11 19:18:01 +05:30
Harendra Kumar
c5e0ee5a0c Add more scan benchmarks for Window folds 2022-06-09 16:46:13 +05:30
Ranjeet Kumar Ranjan
9c87c644f7 Remove tapRate 2022-06-04 13:09:23 +05:30
Ishan Bhanuka
9d68f58a21 Implement concatSequence for parser
concatSequence collects sequential parses of
parsers in a serial stream using a fold.

* Wrapper and internal implementation
* Benchmark and tests
* Documentation update
2022-05-30 12:07:09 +05:30
Harendra Kumar
cf7b9b9927 Add splitWithSuffixSeq benchmarks 2022-05-29 00:29:39 +05:30
Harendra Kumar
2831e12530 Add a benchmark for parseBreak on array streams 2022-05-20 17:43:23 +05:30
Harendra Kumar
9943e6595f Add foldBreak benchmark to array streams 2022-05-20 15:15:06 +05:30
Harendra Kumar
24c48e91a0 Add parseBreak benchmark in Parser module 2022-05-20 15:08:27 +05:30
Harendra Kumar
37e226e263 Add a foldBreak benchmark for StreamD 2022-05-20 03:38:02 +05:30
Harendra Kumar
61b907cf8f Add a benchmark for foldBreak in Fold module 2022-05-20 03:38:02 +05:30
Harendra Kumar
107bebd771 Rename ArrayStream fold/parse operations
Add comments about implementing fold in terms of foldArr
2022-05-20 02:21:21 +05:30
Harendra Kumar
420f387a20 Deprecate the "next" parser, use "one" fold instead 2022-05-19 23:26:49 +05:30
Harendra Kumar
aa6625f449 Add benchmark for takeFramedByEsc_ 2022-05-09 13:02:49 +05:30
Harendra Kumar
d15c033409 Add takeWhileP benchmark 2022-05-09 13:02:49 +05:30
Harendra Kumar
6ed0c935c5 Rename some parser APIs, reorg the export list
And add some proposed commented APIs.
2022-05-08 10:51:52 +05:30
Harendra Kumar
c747309e8c Add deintercalate benchmark 2022-05-06 16:51:30 +05:30
Harendra Kumar
4676d68c57 Add sepBy benchmark 2022-05-05 15:26:40 +05:30
Harendra Kumar
769564d627 Rename drainWhile parser to dropWhile 2022-05-05 15:26:40 +05:30
Harendra Kumar
734df11c97 Move ZipAsync applicative benchmark to o-n-heap category 2022-05-05 10:36:47 +05:30
Ranjeet Kumar Ranjan
a849812d99 Maintain a list of top w elements in the stream 2022-04-22 19:55:41 +05:30
Harendra Kumar
02578386da Use the demux input to determine the fold
We may want to use the entire value to determine the fold and not just
the key. For example, we may have the key as an Int that uniquely
determines the fold (for example a connection/request id). Once the
fold starts we can always lookup the fold using this key. However, to
determine what fold to use initially we may need more information than
just the request-id (e.g. the type of the message).
2022-04-11 18:41:37 +05:30
Harendra Kumar
800ae8a8f8 Use monadic action to generate fold in demux* 2022-04-06 17:43:15 +05:30
Ranjeet Kumar Ranjan
d31f3329f1 Rename some unfold APIs 2022-04-06 17:41:47 +05:30
Harendra Kumar
ba05f939b9 Use explicit buckets in classifySessions benchmarks
Terminate the session fold after 10 elements
2022-04-02 03:32:42 +05:30
Harendra Kumar
e0ad726fbd Fix generic Map support for classifySessionsBy 2022-04-02 03:32:42 +05:30
Harendra Kumar
2ebed4d2fe Make Map generic version of classifySessionsBy 2022-04-02 03:32:42 +05:30
Harendra Kumar
6b2f1c1669 Change demux fold APIs and implementations 2022-04-02 03:32:42 +05:30
Ranjeet Kumar Ranjan
a6f041cdc7 Add scanMany to Fold
use Fold instead Refold

remove redundant imports

Fix review comments

code refactor

Fix benchmark

Fix indent
2022-03-31 01:04:56 +05:30
Harendra Kumar
1a76a06654 Make classifyWith work with IsMap 2022-03-27 03:01:57 +05:30
Harendra Kumar
d78715ce45 Update classify benchmarks
* Move to o-n-heap group
* Add more benchmarks with different bucket sizes
2022-03-26 15:03:58 +05:30
Harendra Kumar
e078bae64a Allow different types of Map in classify
IntMap and HashMap can provide better performance than Map.

Also, allow mutable cells in classify for better performance.
2022-03-26 01:32:51 +05:30
Adithya Kumar
a0a228196c Add unfoldMany to Data.Fold 2022-03-25 15:22:14 +05:30
Ranjeet Kumar Ranjan
3a59974ed8 Rename unfold scan to postscan, add benchmark, test 2022-03-25 15:18:27 +05:30
Ranjeet Kumar Ranjan
af68c08a71 Rename some filesystem APIs 2022-03-25 14:04:00 +05:30
Harendra Kumar
0eadd04ada Add doc, powersums and mean
Rename "whole" to "cumulative"
2022-03-25 12:33:58 +05:30
Ranjeet Kumar Ranjan
f95fcbd82f Add a module for sliding window folds
Moved some basic incremental folds from 'streamly-statistics" package.
2022-03-25 12:33:58 +05:30
Ranjeet Kumar Ranjan
e01bc90866 Implement Array modifyIndices may accept index as argument 2022-03-25 00:21:28 +05:30
Ranjeet Kumar Ranjan
6726613bca Remove the Sink module 2022-03-25 00:12:48 +05:30
Ranjeet Kumar Ranjan
7886e14505 Add benchmark for MArray.modifyIndices 2022-03-24 15:36:08 +05:30
Ranjeet Kumar Ranjan
07bf70d5f8 Drop GHC 8.x to 8.2.x Support 2022-03-24 02:23:45 +05:30
Harendra Kumar
ddfe6bd538 Add a "foldFilter" combinator to serial streams 2022-03-23 00:59:02 +05:30
Harendra Kumar
8dabc2ec8a Add a "foldFilter" combinator for folds 2022-03-23 00:54:53 +05:30
Harendra Kumar
62fe488ac1 Add foldMany to unfolds 2022-03-23 00:43:15 +05:30
Ranjeet Kumar Ranjan
3012ae95e5 Change the argument order of Unfold.many 2022-03-19 11:49:15 +05:30
Harendra Kumar
5e7fb870a6 Change classifyWith to work with scans 2022-03-14 11:47:42 +05:30
Harendra Kumar
b8b410d23d Simplify array strip, improve perf 2022-03-14 02:30:18 +05:30
Ranjeet Kumar Ranjan
faabb9a01f Add mutable array "strip" operation 2022-03-14 02:29:41 +05:30
Ranjeet Kumar Ranjan
4b49390286 Fix uniqBy and rollingMap
Fix hlint

Fix review comments

Add Functor contraint

Fix review comments
2022-03-11 13:46:05 +05:30
Ranjeet Kumar Ranjan
f31f28c0d8 Move toParserK and fromParserK routines from ParserK to the ParserD module 2022-03-11 13:38:17 +05:30
Adithya Kumar
fe8e57968a Merge PreludeCommon and Prelude into Common in the core package 2022-03-10 23:47:56 +05:30
Adithya Kumar
22e8ad3b99 Change the signature order for Foreign.getIndex 2022-03-07 03:54:51 +05:30
Adithya Kumar
efd41db1b8 Add writeCharUtf8' and parseCharUtf8With along with benchmarks 2022-02-12 08:13:40 +05:30
Harendra Kumar
ec20f5fdff Fix/simplify intersectBySorted
* Remove MonadIO and Eq constraints
* Simplify implementation
* Simplify tests
* Fix formatting
* Use longer benchmarks
2022-02-10 17:22:28 +05:30
Ranjeet Kumar Ranjan
160393c8e0 Implement intersectBySorted API 2022-02-10 14:47:01 +05:30
Adithya Kumar
f235118945 Revert the Foreign.getIndex order change as it is a released API 2022-02-06 03:52:44 +05:30
Adithya Kumar
7cd7a185d3 Change the working array position in the APIs of Foreign(.Type) 2022-02-06 03:52:44 +05:30
Harendra Kumar
3dd9c8d9f6 Add takeBetween to ParserD benchmarks 2022-02-05 23:58:22 +05:30
Harendra Kumar
69785a3184 GHC-9: Remove NOINLINE on some benchmarks
Two FileSystem.Handle benchmarks required a NOINLINE earlier, now need that to
be removed in GHC-9.
2022-02-05 23:58:22 +05:30
Ranjeet Kumar Ranjan
582410afda Implement joinLeftHash API 2022-02-02 12:36:43 +05:30
Harendra Kumar
c8d1ca3fc7 Fix joinOuterMap operation
The streams were used multiple times, now they are used only once.
2022-02-02 07:04:37 +05:30
Ranjeet Kumar Ranjan
72a2b1fa43 Implement joinOuterHash API 2022-02-02 07:04:37 +05:30
Anurag Hooda
84456c109e Add benchmarks for fold.scan and fold.postscan 2022-01-24 00:49:12 +05:30
Harendra Kumar
66fe3d1ec9 Optimize and rename joinInnerHash to joinInnerMap 2022-01-15 02:26:26 +05:30
Ranjeet Kumar Ranjan
9351485395 Add benchmarks for joinInnerHash 2022-01-15 02:26:26 +05:30
Harendra Kumar
c9e94327af Optimize inplace partitionBy for mutable arrays 2022-01-14 11:03:30 +05:30
Ranjeet Kumar Ranjan
21e948a59f Implement partitionBy 2022-01-12 19:17:27 +05:30
adithyaov
10876d893d Remove the common ArrayOps file 2022-01-05 13:48:09 +05:30
adithyaov
07df90e03a Apply hlint suggesstion on array benchmark files 2022-01-05 13:48:09 +05:30
adithyaov
9f1144fd7c Cleanup bench:Data.Array by ridding of unecessary CPP pragmas 2022-01-05 13:48:09 +05:30
adithyaov
f8d80ccc0d Move benchmarks of Array.Prim.Pinned out of common benchmark mess 2022-01-05 13:48:09 +05:30
adithyaov
ad1bb0de79 Move benchmarks of Array.Prim out of common array benchmark mess 2022-01-05 13:48:09 +05:30
adithyaov
2370901026 Move benchmarks of Array.Foreign out of common array benchmark mess 2022-01-05 13:48:09 +05:30
adithyaov
fd55f07b8c Move benchmarks of SmallArray out of common array benchmark mess 2022-01-05 13:48:09 +05:30
adithyaov
ef0a299876 Fix an array benchmarking BUG 2022-01-05 12:25:53 +05:30
adithyaov
f51025b4c5 Add a zipAsync traverse benchmark 2021-12-09 15:13:58 +05:30
Harendra Kumar
6db157f120 Add include-strict-utf8 build flag
When this flag is enabled benchmarks that require strictly valid utf8
input are enabled.
2021-11-30 04:41:31 +05:30
Harendra Kumar
25e2dd5562 Use a shorter stream for concatMapWithInterleave
It has quadratic performance
2021-11-30 03:01:28 +05:30
Adithya Kumar
ac1b895bbf Reclassify concatStreamsWithInterleave benchmarks as o_n_space 2021-11-23 18:42:48 +05:30
Adithya Kumar
96fea1e537 Reclassify concatPairWith zipping benchmarks under o-n-heap 2021-11-23 18:42:48 +05:30
Adithya Kumar
c3620cf008 Reclassify concatPairWith benchmarks under o-n-space 2021-11-23 18:42:48 +05:30
Adithya Kumar
05bf4fe4b8 Fix dev build 2021-11-17 12:55:57 +05:30
Ranjeet Kumar Ranjan
95b8d90443 Implement a polymorphic ring buffer 2021-11-07 23:45:34 +05:30
Harendra Kumar
6e52834cb2 Fix groupByRollingEither
* Change the signature to return different types in Either
* Fix a case to return correct Either value
* Fix and enhance benchmarks
* Implement sortBy using groupByRollingEither
2021-11-07 10:34:03 +05:30
Ranjeet Kumar Ranjan
b926110aff Add bench mark 2021-11-07 00:47:58 +05:30
Julian Ospald
5424bbef4d Add 'next' benchmark 2021-11-06 21:54:26 +05:30
Harendra Kumar
06e55120ce Rename Consumer to Refold
Consumer is a very generic name. One cannot intuitively distinguish
between Consumer and Fold. "Refold" gives a better idea that its a
slightly modified version of Fold with a starting value. Also, it fits
better as a dual to Unfold.
2021-10-22 01:34:02 +05:30
Harendra Kumar
c48ef0464b Improve NFData instance
This would make the comparison with prim arrays fairer.
2021-10-15 17:49:06 +05:30
Harendra Kumar
3201dc8328 Add consumeMany benchmark 2021-10-12 20:50:29 +05:30
Harendra Kumar
5342b1629f Add consumeIterateM benchmark 2021-10-12 20:50:29 +05:30
Harendra Kumar
0548e36d51 Rename Transformation1 benchmark module
to Transformation
2021-10-12 20:46:49 +05:30
Harendra Kumar
4179a3bdf2 Rename Transformation2 benchmark module to NestedFold 2021-10-12 20:46:49 +05:30
Harendra Kumar
55758dd5b7 Rename Nested benchmark module to NestedStream 2021-10-12 20:46:49 +05:30
Harendra Kumar
8dc51e8b05 Move Transformation3 benchmark module to Lift 2021-10-12 20:46:49 +05:30
Harendra Kumar
58b7b77857 Make the seed in foldIterateM monadic 2021-10-10 14:17:06 +05:30
Harendra Kumar
cd29e5e2df Add toStreamK and toStreamKRev 2021-10-10 11:34:25 +05:30
Harendra Kumar
e265852671 Add skeleton for groupByRollingEither
The driving use case for this is to make the sorting faster by detecting
sorted sequences in the input.
2021-10-01 13:57:36 +05:30
Harendra Kumar
36c22e3b5b Add INLINE to zipWith and zipWithM 2021-09-30 09:38:39 +05:30
Harendra Kumar
68317a4a41 Fix/enhance benchmarks for concatPairsWith
* Add a benchmark for mergeByMFused
* Move interleaving benchmarks to WSerial module
* Rename some wserial benchmarks
* Add a Merge module for mergeBy/sorting benchmarks
2021-09-28 16:59:29 +05:30
Harendra Kumar
70e7f94691 Move IsStream definition out of low level modules
The IsStream type class contains MonadAsync type in the consM method.
This refactor allows lifting MonadAsync, therefore, dependency on
monad-control out of the low level modules.
2021-09-14 23:11:17 +05:30
Harendra Kumar
2c4860045d Refactor and reformat 2021-09-05 05:39:45 +05:30
Harendra Kumar
e052c821b6 Add serial_ benchmark 2021-09-05 05:39:45 +05:30
Ranjeet Kumar Ranjan
878d734dd7 Implement some undefined functions in Fold module
Implement Some undefined in Internal.Data.Fold module

Add test cases for newly added functions

Add bench marks for newly added Data.Fold functions
2021-09-05 05:39:45 +05:30
Ranjeet Kumar Ranjan
8d9396711c Remove map from Internal.Data.Fold 2021-09-01 18:14:37 +05:30
Ranjeet Kumar Ranjan
8d733b2209 Fix review comments and docspecs
Remove supplyMiddle and supplyNextFromStride

Fix enumerateFromNum for precision issue
2021-08-24 08:44:21 +05:30
Ranjeet Kumar Ranjan
ba9a4e8f6a Change signature of enumerate functions 2021-08-24 08:44:21 +05:30
Ranjeet Kumar Ranjan
6d98f4e135 Add Enumerable typeclass for Unfold 2021-08-24 08:43:19 +05:30
Harendra Kumar
a296fac8db Refactor SVar module
* Break it up into smaller modules with clearly separated functionality
* Keep minimal stuff in the lower level module SVar/Type, and push the
  rest in a higher level module to reduce dependencies of lower level
  modules. This will help in separating the lower modules in streamly-core
  package.
2021-08-20 00:47:56 +05:30
Adithya Kumar
17dfc5b087 Add benchmarks for retry 2021-08-09 21:21:33 +05:30
Adithya Kumar
69e3b2c010 Add unicode normalization bench-suite 2021-08-09 19:43:40 +05:30
Adithya Kumar
a322c073c3 Add benchmarks for Parser.choice 2021-08-09 16:36:48 +05:30
Ranjeet Kumar Ranjan
0b889318ed toStream/toStreamRev should be able to fold to any monad
Fix review comment

Fix benchmark

Fix warnings
2021-08-05 04:40:24 +05:30
Adithya Kumar
15397be802 Add benchmarks for takeP 2021-08-04 20:58:44 +05:30
Adithya Kumar
7830df9314 Add simple bench suite for Unicode.Utf8 2021-07-30 19:01:54 +05:30
Adithya Kumar
c9232b0e25 Extracted IO related common functions into a new module 2021-07-29 15:35:16 +05:30
Harendra Kumar
3339c2082d Add fold and parse for array streams
The test and benchmark code is taken from Adithya's original double
ended lists based implementation.
2021-07-26 18:14:46 +05:30
Harendra Kumar
424f1e9871 Fix the space requirements of two benchmarks
Move showInstance benchmark for pure streams to o-n-space
Increase the heap space for array map x 4
2021-06-22 22:50:12 +05:30
Harendra Kumar
e09428332c Revert "Fix zipWith(M) to work concurrently according to the stream type"
This reverts commit 1ddcfc4634.

This requires MonadAsync constraint which breaks the existing
zipWith for pure streams e.g. 'SerialT Identity' (for example in
streaming-benchmarks package). We can possibly have different zipWith
APIs for concurrent zipping.
2021-06-22 12:39:07 +05:30
Harendra Kumar
67f851374c Inline MC.try to fix perf for GHC-9 2021-06-21 15:55:44 +05:30
Harendra Kumar
c4358b3957 Fix Array.Pin.Pinned benchmark module name 2021-06-08 23:54:04 +05:30
Harendra Kumar
03218ad71b Cleanup, fix issues in bench.sh 2021-06-08 23:54:04 +05:30
Ranjeet Kumar Ranjan
b68baf3c51 Add support for benchmarking with tasty-bench
tasty-bench has fewer dependencies and is agile to keep up with new GHC
versions. This change is especially motivated by support for GHC 9.0.1.
gauge depends on foundation/basement which lagging much behind and seem
to be unmaintained.
2021-06-08 23:54:04 +05:30
Harendra Kumar
d51fab489f Fix benchmark name prefixes to module names
Otherwise the new bench.sh changes for tasy-bench won't work for these
modules.
2021-06-08 23:54:04 +05:30
Harendra Kumar
28e17ee82e Fix a perf issue in iterate/iterateM
It was taking O(n) space, now it takes O(1)
2021-06-02 22:18:00 +05:30
Pranay Sashank
90be38762b Rename Fold.yield, yieldM to fromPure, fromEffect. 2021-05-30 22:24:54 +05:30
Pranay Sashank
f24ddc0bdf Rename Unfold.yield, yieldM to fromPure, fromEffect. 2021-05-30 22:24:54 +05:30
Pranay Sashank
70faf014ca Rename Streamly.Prelude.yieldM to fromEffect.
- Deprecate yieldM.
2021-05-29 02:05:01 +05:30
Pranay Sashank
4dfc6bf9ee Rename Streamly.Prelude.yield to fromPure.
- Deprecate yield.
2021-05-29 01:22:02 +05:30
Harendra Kumar
03cf686ca7 Export some pre-release array APIs
* getIndex
* casting ops
* writeLastN
* readRev
2021-04-27 13:37:56 +05:30
Harendra Kumar
6132eb3acb Split stdio ops into a Console.Stdio module
Change the FileSystem.Handle from* APIs to put*

Mutable write APIs would use a "put" prefix to make the name more intuitive.
2021-04-25 15:53:38 +05:30
Harendra Kumar
dc647f4a4e Change the argument order of intercalate and interpose 2021-04-24 16:17:39 +05:30
Harendra Kumar
a75c178599 Expose rollinghash and intercalate 2021-04-24 16:16:12 +05:30
Harendra Kumar
f64dd78449 Fix benchmark names, cleanup imports, fix hlint
Refactor only.
2021-04-24 13:36:28 +05:30
Adithya Kumar
cd916f54bb Move array stream bench/tests to separate modules 2021-04-19 19:38:14 +05:30
Ranjeet Kumar Ranjan
ac215ad43f Rename serially etc. to fromSerial etc. #1029 2021-04-16 00:20:54 +05:30
Ranjeet Kumar Ranjan
138d519601 concatPairsWith benchmarks #984 2021-04-07 14:06:34 +05:30
Adithya Kumar
1ddcfc4634 Fix zipWith(M) to work concurrently according to the stream type
https://github.com/composewell/streamly/issues/158
2021-04-06 02:34:54 +05:30
Adithya Kumar
f1f8d7ac5e Renamed function/bench names appropriatly in bench:StreamK
Also add a the benchmarks that need to be added
2021-03-31 17:42:09 +05:30
Adithya Kumar
029e6873e7 Fix filterScan. Revert to using maxBound over streamLen.
Quoting, harendra-kumar,

> Since we are adding the numbers in the stream, <= streamLen would terminate
> the stream much earlier. We should use maxBound instead. That's because we
> compose this with filter again in the mixed benchmarks
2021-03-30 17:02:18 +05:30
Adithya Kumar
876b904ecb Modify benchmarks to keep name comparisions backwards compatible 2021-03-30 17:02:18 +05:30
Adithya Kumar
98bc69e3d0 Rename value-ish to streamLen-ish in bench:StreamK
maxValue -> value
value -> streamLen
value2 -> streamLen2
value3 -> streamLen3
value16 -> streamLen16
2021-03-30 17:02:18 +05:30
Adithya Kumar
1079b49aab Collapse sourceUnfoldr(M)N into sourceUnfoldr(M) in bench:StreamK
As of this commit they are completely identical.
2021-03-30 17:02:18 +05:30
Adithya Kumar
ada707b778 Move passing benchmark properties to the root in bench:StreamK 2021-03-30 17:02:18 +05:30
Adithya Kumar
ad4bcce47f Remove unecessary code in bench:StreamK 2021-03-30 17:02:18 +05:30
Adithya Kumar
f1c19a6e85 Split O(1) space benchmarks into multiple groups in bench:StreamK 2021-03-30 17:02:18 +05:30
Adithya Kumar
23253c0270 Move global limits into function arguments in bench:StreamK 2021-03-30 17:02:18 +05:30
Adithya Kumar
c7cd7c877a Keep the INLINE statement & signature with function 4 bench:StreamK 2021-03-30 17:02:18 +05:30
Harendra Kumar
ae741f1bd8 Change the order of arguments in Unfold.fold
To keep it consistent with Stream.fold.
2021-03-26 20:27:56 +05:30
Harendra Kumar
0954511144 Refactor/rename/add basic unfold constructors 2021-03-24 21:19:18 +05:30
Harendra Kumar
8af1c368c6 Change signatures of zipWith/zipWithM 2021-03-24 20:38:56 +05:30
Harendra Kumar
a5e483b610 Refactor Unfold module
* Rearrange exports, export additional functions
* Update docs
* Disable applicative/monad/category/arrow instances
* Rename const to yieldM and add yield
* Remove "effect", it can be expressed by yieldM
* Change order of arguments for some functions
2021-03-24 01:40:30 +05:30
Ranjeet Kumar Ranjan
b73b5ffa3a Rename concatUnfold to unfoldMany #986 2021-03-22 19:05:17 +05:30
Ranjeet Kumar Ranjan
7759cc0082 Rename Unfold.concat to Unfold.many #985 2021-03-20 00:40:13 +05:30
Harendra Kumar
3b1a26cee5 Update Fold module docs and expose some APIs 2021-03-16 01:46:51 +05:30
Harendra Kumar
badc62d2b7 Rename stream transformation some APIs
Primary motivation for renaming takeEnd was to avoid confusion with
takeEndBy but I like the new name takeLast irrespective of that.
2021-03-14 01:02:10 +05:30
Adithya Kumar
92771949ad Fix import error 2021-03-12 01:30:23 +05:30
Adithya Kumar
a1472167de Make behaviour of Fold.many similar to that of foldMany/parseMany 2021-03-12 01:01:51 +05:30
Harendra Kumar
cd0a185607 Add NOINLINE for better optimization of loops 2021-03-12 01:01:51 +05:30
Ranjeet Kumar Ranjan
87ebad51cb Rename Types.hs modules to Type.hs 2021-03-11 15:12:08 +05:30
Harendra Kumar
e9a0e7c118 Move rmapM to Fold/Types.hs 2021-03-10 19:29:12 +05:30
Ranjeet Kumar Ranjan
4da398aa00 Change argument order in parser combinators #969
Keep the collecting fold as the last argument for ease of composition.
Data flows from one fold to the next, so the next fold in the chain
should be the last argument.
2021-03-09 23:10:43 +05:30
Adithya Kumar
7da0593dbb Add benchmarks for foldIterateM 2021-03-09 07:56:12 +05:30
Harendra Kumar
7910e05da7 Change the argument order in "many" 2021-03-08 19:53:20 +05:30
Harendra Kumar
d2e3430348 Rename some fold combinators
This commit has no functional change, only renaming and doc edits.
2021-03-07 23:04:41 +05:30
Harendra Kumar
fca88a49e8 Change the input stream type of classifySessionsBy
For more convenient operation.
2021-03-05 14:10:17 +05:30
Harendra Kumar
f7681dc897 Reorder the arguments in classifySessionsBy
For more convenient and intuitive use.
2021-03-05 13:04:35 +05:30
Ranjeet Kumar Ranjan
df38c4a8a4 Change splitWith to serialWith in folds and parsers 2021-03-05 11:46:59 +05:30
Ranjeet Kumar Ranjan
0414fe8ec6 Rename takeLE to take 2021-03-05 11:43:48 +05:30
Adithya Kumar
171907e2b3 Remove Applicative instance of Fold 2021-03-05 09:22:50 +05:30
Harendra Kumar
2c21267a6d Fix fromStreamD performance
Before: not finishing in reasonable time
After: 686 us (similar to fromStream)
2021-02-22 14:07:35 +05:30
Harendra Kumar
c8b9fac92b Move parse functions to Source module
Plus:

* Fix returning buffer in the "parse" function
* Some more minor formatting/doc fixups.
2021-02-21 01:58:20 +05:30
Harendra Kumar
2a7e3ccdbc Rename the resumable Unfold type to Producer 2021-02-21 01:58:20 +05:30
Harendra Kumar
7c95ccaaad Use an explicit state to represent nested loops 2021-02-21 01:58:20 +05:30
Harendra Kumar
c93bad0134 Simplify the type of resumable Unfold 2021-02-21 01:58:20 +05:30
Harendra Kumar
22c83f40fd Add resumable unfolds for efficient nested parsing
Instead of using a closed loop we can stop an unfold and then resume it
later. This allows us to break the loop and restart it at some other
point. For example, we can parse a block from an input stream from a
file handle or a socket and then return the socket/handle plus nay
buffered data (due to backtracking) so that we can resume reading from
it later on after doing some processing.
2021-02-21 01:58:20 +05:30
Harendra Kumar
e6865109d1 Move the concat benchmark to Unfold module
Remove the NestedUnfoldOps module.
2021-02-20 10:41:58 +05:30
Harendra Kumar
77d11d37bb Add Monad instance for Unfold 2021-02-20 08:54:28 +05:30
Harendra Kumar
4f9fc7d2c9 Fix duplicate benchmark names
Move the fold benchmarks in stream module to the fold module.
2021-02-20 08:54:28 +05:30
Harendra Kumar
3947fee691 Add Applicative instance for Unfold 2021-02-20 08:51:30 +05:30
Harendra Kumar
2c70b45660 Implement concatPairswith/sortBy 2021-02-17 17:19:34 +05:30
Adithya Kumar
195606428c Add some nested benchmarks with parseMany 2021-02-14 22:46:43 +05:30
Adithya Kumar
b04187b602 Move parseMany benchamrks from FileSystem.Handle to Data.Parser 2021-02-14 14:37:37 +05:30
Pranay Sashank
9ebca6ec0a Add sequence_ benchmark for ParserD. 2021-02-11 15:01:41 +05:30