Skip to content
Snippets Groups Projects
Verified Commit 6878a8af authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Update benchmark and fix type instability

parent 21e1b66d
No related branches found
No related tags found
No related merge requests found
Pipeline #50982 failed
......@@ -45,16 +45,15 @@ julia> using MuonLight
julia> dp = MuonLight.DispersionARCA
BasicDispersion(350.0, 1.3201, 1.4e-5, 16.2566, -4383.0, 1.1455e6)
julia> @benchmark MuonLight.directlight($dp, R, θ, ϕ) setup=begin; R=(rand()+1)*300; θ=rand()*2π; ϕ=rand()*2π; end
BenchmarkTools.Trial: 10000 samples with 11 evaluations.
Range (min … max): 1.004 μs … 37.780 μs ┊ GC (min … max): 0.00% … 92.37%
Time (median): 1.042 μs ┊ GC (median): 0.00%
Time (mean ± σ): 1.062 μs ± 521.187 ns ┊ GC (mean ± σ): 0.66% ± 1.30%
julia> @benchmark MuonLight.directlight($dp, $MuonLight.PMTKM3NeT, R, θ, ϕ) setup=begin; R=(rand()+1)*300; θ=rand()*2π; ϕ=rand()*2π; end
BenchmarkTools.Trial: 10000 samples with 196 evaluations.
Range (min … max): 466.199 ns … 6.137 μs ┊ GC (min … max): 0.00% … 88.89%
Time (median): 477.469 ns ┊ GC (median): 0.00%
Time (mean ± σ): 488.605 ns ± 175.758 ns ┊ GC (mean ± σ): 1.25% ± 3.18%
▄██▇ ▄▁
▂▂▂▃▅▁█████▁███▆▆▁▆▇▆▅▅▁▄▃▃▃▃▁▄▄▄▃▃▁▃▃▂▂▂▁▂▂▂▂▂▁▂▂▂▂▂▁▂▂▂▂▂ ▃
1 μs Histogram: frequency by time 1.19 μs <
Memory estimate: 1.12 KiB, allocs estimate: 62.
▃▅▆▇██▆▃▁▁▂▃▃▄▄▅▄▃▁▁ ▂
▅████████████████████████████▇▇██▆▅▆▆▅▄▅▅▆▅▅▅▄▄▇▄▃▆▅▁▁▅▄▃▃▄▃▅ █
466 ns Histogram: log(frequency) by time 564 ns <
Memory estimate: 320 bytes, allocs estimate: 7.
```
......@@ -120,7 +120,7 @@ end
Returns the absorption length [m] for a given wavelength [nm].
"""
absorptionlength = LinearInterpolator(
const absorptionlength = LinearInterpolator(
[0, 290, 310, 330, 350, 375, 412, 440, 475, 488, 510, 532, 555, 650, 676, 715, 720, 999999],
[0.0, 0.0, 11.9, 16.4, 20.6, 29.5, 48.5, 67.5, 59.0, 55.1, 26.1, 19.9, 14.7, 2.8, 2.3, 1.0, 0.0, 0.0],
NoBoundaries()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment