Commit Graph

4552 Commits

Author SHA1 Message Date
Harendra Kumar
7b52ccfff6 Partially fix the recording stuff
handlResult is still to be used
2017-08-10 00:13:05 +05:30
Harendra Kumar
f8851aa158 Add MonadRecorder instance to AsynclyT 2017-08-09 18:21:28 +05:30
Harendra Kumar
4f3775d51f Enable threads API and tests 2017-08-09 17:44:05 +05:30
Harendra Kumar
17b30bafb7 rename the runner APIs 2017-08-09 17:30:33 +05:30
Harendra Kumar
504800bebe More cleanup in RunAsync 2017-08-09 17:19:02 +05:30
Harendra Kumar
bb5a74d32a Some cleanups 2017-08-09 16:22:25 +05:30
Harendra Kumar
eca7d81223 Remove redundant composition primitives
These can be simulated using a wait on an event and lifting/discarding
the result.
2017-08-09 15:37:10 +05:30
Harendra Kumar
a20c180451 Some cleanup 2017-08-09 02:11:16 +05:30
Harendra Kumar
99d9ba6c07 Fix the composite benchmark code 2017-08-08 20:37:11 +05:30
Harendra Kumar
c1f0a867c3 Continuation based implementation
Seems to have similar (slightly worse) performance as the lazy impl without
continuations.

lazy-streaming witout continuations without StateT = 400 ms
with continuations without StateT = 550 ms

However with continuations we do not need SPECIALIZE which is a significant
advantage to freely use in any Monad wihtout worrying about perf.
2017-08-08 15:23:14 +05:30
Harendra Kumar
7e8209e2d6 Separate the State layer from AsyncT layer
Performance degrades by 2x

StateT/AsyncT combined = 560 ms
Separated AsyncT (StateT Context IO) = 1.2 s
AsyncT IO in the separated version = 400 ms
2017-08-07 19:55:38 +05:30
Harendra Kumar
4d7024fae0 Initial poc of lazy streaming 2017-08-07 15:15:09 +05:30
Harendra Kumar
11c1f14755 Add some simple tests 2017-08-07 15:14:41 +05:30
Harendra Kumar
c49732a7a6 Move the each primitive to right place 2017-08-04 13:31:38 +05:30
Harendra Kumar
cc4743cb5f Add machine benchmark and fix others 2017-08-04 13:30:40 +05:30
Harendra Kumar
4d4894c6f1 Move the thread contol primitive to threads module 2017-07-21 14:13:55 +05:30
Harendra Kumar
3c7a92a35d Move around some code 2017-07-21 14:03:36 +05:30
Harendra Kumar
0d9243fc0a Separate the threadstate management layer 2017-07-21 13:54:02 +05:30
Harendra Kumar
31b3b5b1d0 Rename the Threads module 2017-07-21 11:30:47 +05:30
Harendra Kumar
3ed5abc542 Add some more SPECIALIZE and INLINE pragmas 2017-07-19 12:49:41 +05:30
Harendra Kumar
ce6719a6b8 More SPECIALIZE and CAS for atomicmodify 2017-07-19 11:17:02 +05:30
Harendra Kumar
b7d651f24d SPECIALIZE monad, alternative and each for IO 2017-07-19 10:47:51 +05:30
Harendra Kumar
9ec9c527e3 add noinline pragma for bind 2017-07-19 08:58:15 +05:30
Harendra Kumar
e1fc30a63c Remove additional binds, change continuations model 2017-07-19 08:43:52 +05:30
Harendra Kumar
59c0bac57b Change foldl to foldr in "each" 2017-07-19 08:16:02 +05:30
Harendra Kumar
5457bbd10f Add asyncly to benchmarks 2017-07-19 08:10:56 +05:30
Harendra Kumar
b1068152b7 Add benchmarks including transient 2017-07-17 21:28:04 +05:30
Harendra Kumar
d64225fe30 Reorganize code top to bottom in dependency order
for AsyncT.hs
2017-07-16 17:49:07 +05:30
Harendra Kumar
1be7567d2b Remove redundant unsafeCoerce 2017-07-15 13:20:34 +05:30
Harendra Kumar
1d8d3878cc Minor doc fix 2017-07-15 12:38:25 +05:30
Harendra Kumar
d848fdc0da Add readme for running examples 2017-07-14 11:12:15 +05:30
Harendra Kumar
b347f8feb6 Add examples 2017-07-14 11:09:21 +05:30
Harendra Kumar
e5da40c94c Add some doc updates 2017-07-14 11:07:12 +05:30
Harendra Kumar
2756fbd691 Add monad-recorder github repo to stack.yaml 2017-07-13 18:58:01 +05:30
Harendra Kumar
8340241116 Split the logging functionality into a separate package 2017-07-13 18:21:26 +05:30
Harendra Kumar
795dd4b905 Some code reorg 2017-07-08 15:44:17 +05:30
Harendra Kumar
c60d15c39a Add "afterFirst" run an action after first event 2017-07-08 15:39:38 +05:30
Harendra Kumar
922c9ed018 Fix, cleanup and test discarding compositions 2017-07-08 14:09:43 +05:30
Harendra Kumar
f5cfead136 Alternative now forks automatically
Alternative "can" fork an action
`async` primitive is used to force an action to be async
2017-07-08 07:31:49 +05:30
Harendra Kumar
6c12266b1f Add more tests 2017-07-03 08:08:22 +05:30
Harendra Kumar
1e4950dac0 Simplify continuation saving and retrieval
Reduce untyped fields in the context
Merge Context.hs to AsyncT.hs
2017-07-03 05:16:26 +05:30
Harendra Kumar
4a176487ea Add makeAsync to convert callbacks into AsyncT actions 2017-07-01 04:24:14 +05:30
Harendra Kumar
f4237bfab3 rename to asyncly 2017-07-01 02:02:39 +05:30
Harendra Kumar
0e80adf13f Add test suite 2017-07-01 01:37:25 +05:30
Harendra Kumar
fe02431534 Keep just one basic async primitive, remove the rest 2017-07-01 01:35:49 +05:30
Harendra Kumar
120d0ed5f0 Add API to gather results of multiple computations 2017-06-29 05:40:29 +05:30
Harendra Kumar
afbd289a89 More complicated logging tests 2017-06-29 05:21:50 +05:30
Harendra Kumar
760a298598 rename APIs 2017-06-29 05:21:11 +05:30
Harendra Kumar
f455a06d0a Make logs work with regular wait/gather APIs too 2017-06-29 03:59:27 +05:30
Harendra Kumar
a9d6c29ba7 implement log replay 2017-06-29 03:32:48 +05:30