Commit Graph

342 Commits

Author SHA1 Message Date
Pranay Sashank
cfb953556d Refactor ZipAsync ops into a separate test suite. 2020-07-27 08:04:18 +05:30
Pranay Sashank
9cec13f699 Refactor ZipSerial ops into a separate test suite. 2020-07-27 08:03:30 +05:30
Pranay Sashank
80daa14f61 Refactor WSerial ops into a separate test suite. 2020-07-27 08:03:27 +05:30
Pranay Sashank
397d1672a3 Refactor Serial ops into a separate test suite.
- Refactor cabal options into a common prelude-test-options stanza.
- Add semigroups as a dependency for prelude test suites.
2020-07-27 07:59:12 +05:30
adithyaov
ef7c6d9633 Skip building Array.Prim.* modules for ghc < 8.0
getSizeofMutableByteArray# does not exist for versions of ghc below 8
2020-07-21 09:13:31 +05:30
adithyaov
4d0631a0c6 Add Data.Array.Prim.Pinned and Data.Array.Prim
Respect the new module structure for Internal files
2020-07-21 09:13:31 +05:30
adithyaov
12c672ef1d Split the current Array into Array and Mutable.Array
* Add unsafeFreezeWithShrink
* Cleanup + Reformat code + Respect hlint
2020-07-20 19:06:35 +05:30
adithyaov
27c3aebbce Combine all the array benchmarks to reduce duplication
Use --stream-size for all the array benchmarks now

Replace the following files:
- benchmark/Streamly/Benchmark/Data/Array.hs
- benchmark/Streamly/Benchmark/Data/ArrayOps.hs
- benchmark/Streamly/Benchmark/Data/Prim/Array.hs
- benchmark/Streamly/Benchmark/Data/Prim/ArrayOps.hs
- benchmark/Streamly/Benchmark/Data/SmallArray.hs
- benchmark/Streamly/Benchmark/Data/SmallArrayOps.hs
- benchmark/Streamly/Benchmark/Memory/Array.hs
- benchmark/Streamly/Benchmark/Memory/ArrayOps.hs
With:
- benchmark/Streamly/Benchmark/Array.hs
- benchmark/Streamly/Benchmark/ArrayOps.hs
2020-07-20 01:44:18 +05:30
Harendra Kumar
095513166d Enable TypeFamilies extension with NoMonoLocalBinds
MonoLocalBinds enabled by TypeFamilies causes performance regressions
see #567, however we can enable TypeFamilies without it.
2020-07-09 18:40:34 +05:30
Harendra Kumar
bc6b4eed32 Reduce compile time mem util in Handle benchmarks
* Split into two modules
* Remove unnecessary INLINE pragmas
2020-07-09 17:40:27 +05:30
Harendra Kumar
3d033ae915 Reorganize, move the FileIO benchmarks
Now they are in FileSystem.Handle module corresponding to the source module
with the same name. Also, now we have them arranged based on space complexity
so that we can apply RTS memory restrictions when running.

Also, now longer benchmarks use a shorter file.
2020-07-08 03:10:09 +05:30
pranaysashank
745265e0f5 Use default-extensions for tests. 2020-07-07 15:18:21 +05:30
pranaysashank
bb12399558 Remove per file extensions from rest of the library modules. 2020-07-01 17:29:21 +05:30
Harendra Kumar
1367bd647d Disallow some language extensions from default use
* UndecidableInstances -- Don't want to use unless indicated
* TypeFamilies         -- Causes large regressions and improvements
* UnboxedTuples        -- interferes with (#.)
2020-07-01 17:29:21 +05:30
Pranay Sashank
6190f1bd02 Use default-extensions inplace of extensions on each file. 2020-07-01 17:29:16 +05:30
Harendra Kumar
48b2f08067 Add config-clock.h to extra-source-files 2020-06-29 02:09:21 +05:30
Harendra Kumar
68cfc3f9be Reduce usage of -Wno-orphans 2020-06-28 22:55:15 +05:30
Ahmed Zaheer Dadarkar
b2cbde7ecf Add tests for ParserD. 2020-06-11 09:10:58 +05:30
Ahmed Zaheer Dadarkar
9c2c7708b3 add transformers dependency 2020-06-10 08:20:52 +05:30
Ahmed Zaheer Dadarkar
2f8d9b0a31 Add tests for Internal.Data.Parser.
- Tests are added for the functions: yield, yieldM, die, dieM, any,
all, fromFold, peek, eof, satisfy, take, takeEQ, takeGE, takeWhile,
takeWhile1, lookAhead, sliceSepBy.
2020-06-10 08:17:15 +05:30
Harendra Kumar
54c5d7da46 Sort extra-source-files 2020-06-07 01:48:05 +05:30
Harendra Kumar
2b330307fb Add missing files in extra-source-files 2020-06-07 01:48:05 +05:30
Harendra Kumar
129ebaf82c Refactor Prelude benchmarks
* Now benchmark modules correspond to source modules. The Prelude module in
  source corresponds to several modules one for each stream type.

* Benchmarks in the same order/groupings as they appear in source

* All benchmarks now have division according to space complexity

* Refactoring reduces a lot of code duplication especially the stream
  generation and elimination functions.

* The RTS options are now completely set in the shell script to run the
  benchmarks.

* RTS options can be set on a per benchmark basis. RTS options work correctly
  now.

* The set of streaming/infinite stream benchmarks is now complete and we can
  run all such benchmarks coneveniently.

* Benchmark "quick"/"speed" options can now be specified on a per benchmark
  basis. Longer benchmarks can have fewer iterations/quick run time.

* Benchmarks are grouped in several groups which can be run on a per group
  basis. Comparison groups are also defined for convenient comparisons of
  different modules (e.g. arrays or streamD/K).

* The benchmark namespaces are grouped in a consistent manner. Benchmark
  executables have a consistent naming based on module names.
2020-06-07 01:48:05 +05:30
adithyaov
ae7a0250cd Split lib/b/Prelude into Generation, Elimination and Transformation 2020-06-07 01:17:42 +05:30
adithyaov
9abd8b84b6 Merge all the Serial/* benchmarks into Serial.hs 2020-06-07 01:09:26 +05:30
Harendra Kumar
f00b5711d5 Add missing files to extra-source-files 2020-06-03 23:30:04 +05:30
Harendra Kumar
f830c1a987 Add Split example to cabal file 2020-06-03 23:30:04 +05:30
Harendra Kumar
2c0f829e35 Use streamly clock instead of "clock" pkg 2020-06-03 23:30:04 +05:30
Harendra Kumar
1691aa3ed1 Move rate test to examples 2020-06-03 23:30:04 +05:30
Harendra Kumar
500d187b8f disable fusion-plugin for tests
Currently tests use -O0 and plugin does not work without an optimization
option.
2020-04-25 00:19:47 +05:30
Harendra Kumar
dde9041833 Use parserK by default and rewrite to ParserD 2020-04-24 00:30:01 +05:30
Harendra Kumar
a03e2872a6 rename Parser module to ParserD
The top level module "Parser" will be using both ParserK and ParserD.
2020-04-24 00:30:01 +05:30
Harendra Kumar
12fef4390f Add a CPS style parser implementation
CPS performs much better for parsing operations like "sequence" and
"choice" on large containers. Given that applicative "sequence" does
not scale, I guess the Monad instance as well won't scale for direct
implementation.
2020-04-24 00:30:01 +05:30
Pranay Sashank
ced5261081 Bump streamly to 0.7.2.
- Update Changelog, CONTRIBUTORS.md, streamly.cabal to 0.7.2.
2020-04-22 16:54:40 +05:30
Pranay Sashank
828a564781 Add GHC 8.10.1 build to CI.
- Disable inspection testing for `fromStreamVar`.
- Fix overlapping pattern matches warning in test/Main.hs.
2020-04-22 14:32:30 +05:30
Pranay Sashank
451239bf9c Bump template-haskell upper bound < 2.17.
- GHC 8.10.1 ships with template-haskell 2.16.
2020-04-20 17:29:07 +05:30
Harendra Kumar
8921064283 Add teeWith - distribute input to 2 parsers
This is perhaps not an ideal implementation but something to play with.
2020-04-14 22:51:53 +05:30
Pranay Sashank
3d88108701 Bump QuickCheck max bounds to < 2.15.
- Update Changelog to reflect the change.
2020-04-13 04:29:15 +05:30
Harendra Kumar
136bf79bab Rename Parse type and Step constructors
Parse => Parser
Keep => Yield
Back => Skip
2020-04-09 04:06:57 +05:30
Harendra Kumar
2723c15d36 Implement stream parsing
This is the initial version of stream parsing. It implements a "Parse"
type, some parsers based on that type, applicative composition, operations to
run parsers (parse) and to run parsers over chunks of a stream (parseChunks).

Parsers are just an extension of Folds in Streamly.Data.Fold. Parsers just add
backtracking and failure capabilities to folds.

Operations like splitOn to split a stream on a predicate can now be expressed
using a parser applied repeatedly on a stream. For example, line splitting can
be done using parsers. Parsers are as fast as fastest custom code for
line splitting.
2020-04-09 04:06:57 +05:30
adithyaov
18949ef414 Move b/NestedOps.hs and b/NestedUnfoldOps.hs to b/Streamly/Benchmark 2020-04-08 19:38:33 +05:30
adithyaov
82e19d6cea Move benchmark/Array* to benchmark/Streamly/Benchmark/Memory/* 2020-04-08 19:38:33 +05:30
pranaysashank
3b143ad917 Bump upper bounds for ghc-prim to < 0.7 2020-03-30 12:53:01 +05:30
adithyaov
9797d7615d Make a sandalone fold executable. 2020-03-29 18:40:51 +05:30
adithyaov
18c903f5c4 Seperate folds from Prelude in benchmarks. 2020-03-18 11:31:01 +05:30
Harendra Kumar
08b8dafad2 remove resourcet from build-depends of search-query 2020-03-04 15:19:09 +05:30
adithyaov
928d8cd0f0 Add resourcet & unliftio-core as pkg dependencies for SearchQuery
This is for the compatibility of resourcet and unliftio-core when
ghc < 8
2020-03-04 02:36:09 +05:30
Harendra Kumar
166bd93267 refactor "base" stream benchmarks
push the benchmark definitions from the top level "BaseStreams.hs" file to the
individual stream modules to improve modularity.
2020-02-21 16:32:46 +05:30
Harendra Kumar
0b00efe4f6 Reorganize benchmark modules
* move common modules to lib directory. This is required because otherwise
  cabal/ghc would try to use them directly and emit warnings about
  missing-modules.

* move the prelude benchmark executables to Streamly/Benchmark/Prelude
  to be consistent with the organization of other modules.
2020-02-21 16:32:46 +05:30
Harendra Kumar
f65dda6908 split "linear" benchmark based on space usage
Benchmarks are divided into 4 categories:

1) using O(1) space
2) using O(n) Heap
3) using O(n) stack
4) using O(n) heap and stack

This allows us to run the benchmark executables with restricted heap
and stack memory limites so that we can catch space leak issues or high
space usage issues quickly.
2020-02-21 16:32:46 +05:30