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

micro-optimize cats #71 #75

Merged
merged 2 commits into from
Mar 7, 2020
Merged

micro-optimize cats #71 #75

merged 2 commits into from
Mar 7, 2020

Conversation

nevillelyh
Copy link
Contributor

@nevillelyh nevillelyh commented Mar 7, 2020

Fixes #69 #71

Before:

[info] Benchmark                            Mode  Cnt     Score   Error  Units
[info] CatsBench.groupCombineAll            avgt       3578.376          ns/op
[info] CatsBench.groupCombineAllOption      avgt       3223.174          ns/op
[info] CatsBench.groupCombineN              avgt        276.500          ns/op
[info] CatsBench.groupRemove                avgt        139.310          ns/op
[info] CatsBench.monoidCombineAll           avgt       2699.879          ns/op
[info] CatsBench.monoidCombineAllOption     avgt       3902.616          ns/op
[info] CatsBench.monoidCombineN             avgt        269.873          ns/op
[info] CatsBench.semigroupCombineAllOption  avgt       3635.529          ns/op
[info] CatsBench.semigroupCombineN          avgt        276.072          ns/op

After:

[info] Benchmark                            Mode  Cnt     Score   Error  Units
[info] CatsBench.groupCombineAll            avgt       1547.365          ns/op
[info] CatsBench.groupCombineAllOption      avgt       1560.716          ns/op
[info] CatsBench.groupCombineN              avgt         32.705          ns/op
[info] CatsBench.groupRemove                avgt         26.642          ns/op
[info] CatsBench.monoidCombineAll           avgt       1654.055          ns/op
[info] CatsBench.monoidCombineAllOption     avgt       1551.833          ns/op
[info] CatsBench.monoidCombineN             avgt         32.472          ns/op
[info] CatsBench.semigroupCombineAllOption  avgt       1569.017          ns/op
[info] CatsBench.semigroupCombineN          avgt         37.198          ns/op

@codecov
Copy link

codecov bot commented Mar 7, 2020

Codecov Report

Merging #75 into master will decrease coverage by 0.75%.
The diff coverage is 85.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
- Coverage   95.09%   94.34%   -0.76%     
==========================================
  Files          19       19              
  Lines         408      442      +34     
  Branches       24       36      +12     
==========================================
+ Hits          388      417      +29     
- Misses         20       25       +5
Impacted Files Coverage Δ
...cala/magnolify/cats/semiauto/GroupDerivation.scala 80.95% <70%> (-9.96%) ⬇️
.../magnolify/cats/semiauto/SemigroupDerivation.scala 90.9% <80%> (-3.21%) ⬇️
...ala/magnolify/cats/semiauto/MonoidDerivation.scala 92.59% <94.73%> (+5.09%) ⬆️

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 d2bddf7...656d40a. Read the comment docs.

@nevillelyh nevillelyh merged commit bf7a848 into master Mar 7, 2020
@nevillelyh nevillelyh deleted the neville/optimization branch March 7, 2020 00:49
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.

Optimize Semigroup#combineN
1 participant