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

Improve performance of RefinedType#unsafeFrom #499

Merged
merged 3 commits into from
May 5, 2018

Conversation

fthomas
Copy link
Owner

@fthomas fthomas commented May 4, 2018

Before this change:

[info] Result
"eu.timepit.refined.benchmark.PosIntBenchmark.unsafeFrom_1":
[info] 23.575 ±(99.9%) 0.264 ns/op [Average]
[info] (min, avg, max) = (22.521, 23.575, 29.684), stdev = 1.119
[info] CI (99.9%): [23.311, 23.840] (assumes normal distribution)
[info] # Run complete. Total time: 00:06:43
[info] Benchmark Mode Cnt Score Error Units
[info] PosIntBenchmark.unsafeFrom_1 avgt 200 23.575 ± 0.264 ns/op

After this change:

[info] Result
"eu.timepit.refined.benchmark.PosIntBenchmark.unsafeFrom_1":
[info] 13.410 ±(99.9%) 0.076 ns/op [Average]
[info] (min, avg, max) = (12.855, 13.410, 14.228), stdev = 0.323
[info] CI (99.9%): [13.334, 13.487] (assumes normal distribution)
[info] # Run complete. Total time: 00:06:43
[info] Benchmark Mode Cnt Score Error Units
[info] PosIntBenchmark.unsafeFrom_1 avgt 200 13.410 ± 0.076 ns/op

Before this change:

[info] Result
"eu.timepit.refined.benchmark.PosIntBenchmark.unsafeFrom_1":
[info]   23.575 ±(99.9%) 0.264 ns/op [Average]
[info]   (min, avg, max) = (22.521, 23.575, 29.684), stdev = 1.119
[info]   CI (99.9%): [23.311, 23.840] (assumes normal distribution)
[info] # Run complete. Total time: 00:06:43
[info] Benchmark                     Mode  Cnt   Score   Error  Units
[info] PosIntBenchmark.unsafeFrom_1  avgt  200  23.575 ± 0.264  ns/op

After this change:

[info] Result
"eu.timepit.refined.benchmark.PosIntBenchmark.unsafeFrom_1":
[info]   13.410 ±(99.9%) 0.076 ns/op [Average]
[info]   (min, avg, max) = (12.855, 13.410, 14.228), stdev = 0.323
[info]   CI (99.9%): [13.334, 13.487] (assumes normal distribution)
[info] # Run complete. Total time: 00:06:43
[info] Benchmark                     Mode  Cnt   Score   Error  Units
[info] PosIntBenchmark.unsafeFrom_1  avgt  200  13.410 ± 0.076  ns/op
@codecov
Copy link

codecov bot commented May 4, 2018

Codecov Report

Merging #499 into master will decrease coverage by 1.22%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #499      +/-   ##
=========================================
- Coverage   94.33%   93.1%   -1.23%     
=========================================
  Files          62      62              
  Lines         671     682      +11     
  Branches       12      14       +2     
=========================================
+ Hits          633     635       +2     
- Misses         38      47       +9
Impacted Files Coverage Δ
...ain/scala/eu/timepit/refined/api/RefinedType.scala 100% <100%> (ø) ⬆️

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 d15f7f4...83cceb2. Read the comment docs.

[info] Result
"eu.timepit.refined.benchmark.PosIntBenchmark.unsafeFrom_1":
[info]   12.577 ±(99.9%) 0.142 ns/op [Average]
[info]   (min, avg, max) = (11.967, 12.577, 14.680), stdev = 0.600
[info]   CI (99.9%): [12.435, 12.718] (assumes normal distribution)
[info] # Run complete. Total time: 00:06:43
[info] Benchmark                     Mode  Cnt   Score   Error  Units
[info] PosIntBenchmark.unsafeFrom_1  avgt  200  12.577 ± 0.142  ns/op
@fthomas fthomas merged commit a75187f into master May 5, 2018
@fthomas fthomas deleted the topic/improve-unsafeFrom branch May 6, 2018 18:51
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.

1 participant