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

WIP: New special and bench modules + StateIO #86

Closed
wants to merge 3 commits into from
Closed

Conversation

LukaJCB
Copy link
Member

@LukaJCB LukaJCB commented Oct 12, 2018

Should address #80 for now.

StateIO uses a Ref to make state updates more performant.
A simple benchmark included in this PR shows this so far:

[info] Benchmark                              Mode  Cnt    Score    Error  Units
[info] StateBench.leftAssociatedBindSpecial  thrpt   10  297.506 ± 13.396  ops/s
[info] StateBench.leftAssociatedBindStateT   thrpt   10  107.687 ±  3.500  ops/s

next step might be to newtype it, to avoid boxing.

@LukaJCB
Copy link
Member Author

LukaJCB commented Oct 12, 2018

Hmm, turning it into a newtype somehow degraded performance of flatMap a bit

[info] Benchmark                              Mode  Cnt    Score    Error  Units
[info] StateBench.leftAssociatedBindSpecial  thrpt   10  234.863 ± 12.094  ops/s
[info] StateBench.leftAssociatedBindStateT   thrpt   10  106.308 ±  3.421  ops/s

@codecov-io
Copy link

Codecov Report

Merging #86 into master will decrease coverage by 6.43%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
- Coverage   91.09%   84.65%   -6.44%     
==========================================
  Files          63       64       +1     
  Lines         539      580      +41     
  Branches        3        3              
==========================================
  Hits          491      491              
- Misses         48       89      +41
Impacted Files Coverage Δ
...cial/src/main/scala/cats/mtl/special/StateIO.scala 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 830e1e8...f74c937. Read the comment docs.

@rossabaker rossabaker changed the base branch from master to main August 19, 2021 13:11
@LukaJCB LukaJCB closed this Aug 16, 2022
@armanbilge armanbilge deleted the special branch November 14, 2023 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants