Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AndThen optimisation #146

Merged
merged 3 commits into from
Mar 13, 2018
Merged

AndThen optimisation #146

merged 3 commits into from
Mar 13, 2018

Conversation

alexandru
Copy link
Member

We used AndThen for the Sync[StateT] instance.

At this point its future in cats-effect is a little uncertain due to typelevel/cats#2187 - however if that PR doesn't make it in Cats, then it will probably continue to live on in cats-effect.

This PR introduces the same optimization used for IO#map, doing fusion in its andThen and compose up to a maximum threshold.

@codecov-io
Copy link

codecov-io commented Mar 11, 2018

Codecov Report

Merging #146 into master will decrease coverage by 4.84%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #146      +/-   ##
==========================================
- Coverage   89.87%   85.02%   -4.85%     
==========================================
  Files          47       47              
  Lines         978     1042      +64     
  Branches       82       78       -4     
==========================================
+ Hits          879      886       +7     
- Misses         99      156      +57

@alexandru
Copy link
Member Author

Will merge this, because AndThen is already on master and this optimization is benign.

Will re-evaluate if we need AndThen or not, once this goes through review: typelevel/cats#2187

@alexandru alexandru merged commit 880488f into master Mar 13, 2018
@alexandru alexandru deleted the andThen branch March 14, 2018 14:54
@alexandru alexandru added this to the 0.10 milestone Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants