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

Switch to FiniteDifferences for @uncertain #82

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

giordano
Copy link
Member

No description provided.

@giordano giordano marked this pull request as draft November 23, 2020 01:44
@codecov-io
Copy link

codecov-io commented Nov 23, 2020

Codecov Report

Merging #82 (88f4616) into master (b8f57d0) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #82   +/-   ##
=======================================
  Coverage   97.09%   97.09%           
=======================================
  Files          12       12           
  Lines         688      688           
=======================================
  Hits          668      668           
  Misses         20       20           
Impacted Files Coverage Δ
src/Measurements.jl 88.88% <ø> (ø)
src/math.jl 100.00% <100.00%> (ø)

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 e18b75a...eb16b51. Read the comment docs.

@codecov-commenter
Copy link

codecov-commenter commented Jun 1, 2021

Codecov Report

Merging #82 (99bbf00) into master (dc99187) will decrease coverage by 0.13%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #82      +/-   ##
==========================================
- Coverage   95.56%   95.43%   -0.14%     
==========================================
  Files          13       13              
  Lines         744      744              
==========================================
- Hits          711      710       -1     
- Misses         33       34       +1     
Impacted Files Coverage Δ
src/Measurements.jl 87.09% <ø> (ø)
src/math.jl 97.92% <100.00%> (ø)
src/conversions.jl 96.00% <0.00%> (-4.00%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@giordano
Copy link
Member Author

giordano commented Sep 1, 2022

For the record, with Julia v1.8.0 and Measurements.jl v2.8.0:

julia> using BenchmarkTools, Measurements

julia> @benchmark @uncertain atan($(10), $(13.5 ± 0.8))
BenchmarkTools.Trial: 10000 samples with 156 evaluations.
 Range (min … max):  672.096 ns …  19.063 μs  ┊ GC (min … max): 0.00% … 95.48%
 Time  (median):     707.747 ns               ┊ GC (median):    0.00%
 Time  (mean ± σ):   767.266 ns ± 766.993 ns  ┊ GC (mean ± σ):  4.52% ±  4.36%

  ▃▆██▇▅▄▃▂▂▁▂▁▂▂▂▂▂▁▂▂▁▁▁▁                                     ▂
  ███████████████████████████▇▇▆▅▇▆▅▄▅▄▅▄▄▄▅▃▅▄▁▃▄▃▁▅▁▃▃▁▃▁▁▄▃▃ █
  672 ns        Histogram: log(frequency) by time       1.28 μs <

 Memory estimate: 656 bytes, allocs estimate: 20.

julia> @benchmark @uncertain log($(9.4 ± 1.3), $(58.8 ± 3.7))
BenchmarkTools.Trial: 10000 samples with 178 evaluations.
 Range (min … max):  611.197 ns … 25.339 μs  ┊ GC (min … max): 0.00% … 96.77%
 Time  (median):     666.593 ns              ┊ GC (median):    0.00%
 Time  (mean ± σ):   758.990 ns ±  1.039 μs  ┊ GC (mean ± σ):  7.03% ±  5.00%

  ▄▆██▇▆▄▄▃▃▃▃▂▂▂▁▂▁▁▁                                         ▂
  ████████████████████████▇▇▇▇▇█▆▆▆▅▅▆▇▆▄▅▆▆▅▅▅▄▅▅▅▃▄▄▅▂▃▄▅▄▄▄ █
  611 ns        Histogram: log(frequency) by time      1.46 μs <

 Memory estimate: 704 bytes, allocs estimate: 21.

On this PR, with the same version of julia:

julia> using BenchmarkTools, Measurements

julia> @benchmark @uncertain atan($(10), $(13.5 ± 0.8))
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min … max):  14.856 μs …  4.743 ms  ┊ GC (min … max): 0.00% … 98.94%
 Time  (median):     17.639 μs              ┊ GC (median):    0.00%
 Time  (mean ± σ):   19.779 μs ± 78.117 μs  ┊ GC (mean ± σ):  6.77% ±  1.71%

      ▁▅█▄                                                     
  ▂▅███████▆▅▄▄▃▃▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
  14.9 μs         Histogram: frequency by time        39.7 μs <

 Memory estimate: 13.33 KiB, allocs estimate: 257.

julia> @benchmark @uncertain log($(9.4 ± 1.3), $(58.8 ± 3.7))
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min … max):  13.204 μs …  5.703 ms  ┊ GC (min … max): 0.00% … 99.20%
 Time  (median):     16.075 μs              ┊ GC (median):    0.00%
 Time  (mean ± σ):   19.445 μs ± 92.030 μs  ┊ GC (mean ± σ):  8.10% ±  1.72%

  ▁▅▆▇██▇▆▆▅▄▃▃▃▂▂▂▁     ▁▁▁▁                                 ▂
  █████████████████████████████▇██▇███▆▆▇▆▆▆▇▇▆▇▆▇▇▇▇▇▇▆▇▆▆▆▆ █
  13.2 μs      Histogram: log(frequency) by time      42.5 μs <

 Memory estimate: 13.28 KiB, allocs estimate: 256.

This change doesn't seem to go into the right direction. Add to the fact I had to relax tolerance in a couple of @uncertain tests.

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.

None yet

3 participants