JuliaMath / JuliaMath/HCubature.jl
Performance versus `quadgk`
- Dominant language
- Julia
- Stars
- 168
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I made some benchmarks and noted that for 1-d integral `quadgk` is way more fast than `hquadrature`. Here is a simple example
```julia
julia> using HCubature, BenchmarkTools
julia> f() = hquadrature(t -> exp(-t)/t, 1, 100000)
f (generic function with 1 method)
julia> g() = HCubature.QuadGK.quadgk(t -> exp(-t)/t, 1, 100000)
g (generic function with 1 method)
julia> @btime f()
26.478 μs (1131 allocations: 31.97 KiB)
(0.21938393439552029, 1.3846093405775578e-9)
julia> @btime g()
10.078 μs (339 allocations: 8.02 KiB)
(0.2193839343955203, 1.3846093658126016e-9)
```
Is this difference on algorithm level or just because `quadgk` is internally optimized?
Thanks!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Julia benchmark in the issue and comparing hquadrature with HCubature.QuadGK.quadgk, including timings and allocations. Determine whether the difference comes from the algorithms or implementation overhead; the issue provides no files or tests to target.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100