Benchmarks

This benchmark suite is accuracy-targeted, not a fixed-node-count race. Every method is timed against a common accuracy target, and methods that do not meet that target are marked explicitly.

Cross-library comparisons include:

  • FastTanhSinhQuadrature.jl
  • QuadGK.jl
  • HCubature.jl
  • Cubature.jl (h and p variants)
  • Cuba.jl (Vegas, Divonne, Cuhre, for >1D)
  • FastGaussQuadrature.jl (1D only)

How to Read This Page

  • Adaptive libraries are run with the same rtol / atol targets.
  • For each test case, we infer an N from the level where FTS adaptive satisfies the stopping criterion.
  • FTS avx is benchmarked at that adaptive-matched N.
  • In the summary figure, the SIMD path is shown for both newer Julia (where @turbo can degrade to a fallback) and Julia 1.12 (where LoopVectorization is active), so the version effect is visible.
  • FastGauss (1D) is calibrated independently to the same tolerance target.
  • The table therefore reports adaptive tolerance-based runs plus fixed-grid comparisons where each method uses its own convergence path.
  • Methods marked with * did not meet the requested target within the candidate node list or evaluation budget.

If you are deciding whether to use this package, the most important distinction is usually the problem class:

  • For endpoint singularities or repeated integrations with pre-computed nodes, Tanh-Sinh can be extremely effective.
  • For ordinary smooth 1D problems, especially oscillatory ones, QuadGK.jl is often the better default.

Methodology

  • Domain: case-dependent (most tests use [-1,1]^d; oscillatory 1D test uses [-π,π])
  • Tolerances: rtol = 1e-6, atol = 1e-8
  • Same target is used across libraries: quad/adaptive_integrate_*/QuadGK/HCubature/Cuba use rtol+atol, Cubature.jl uses reltol+abstol set to the same values, and FastGauss is calibrated to satisfy the same target in terms of actual error.
  • Max evaluations (external adaptive solvers): 200000
  • Timing: @belapsed with interpolation (samples=3, evals=1)
  • One warm call is executed before each timed benchmark.
  • Adaptive cache construction is excluded from timed regions (prebuilt caches).

For this package we benchmark:

  • adaptive_integrate_* typed calls (minimal-dispatch adaptive path),
  • quad convenience calls,
  • precomputed-node _avx calls at the N inferred from adaptive convergence.

The raw benchmark outputs also include absolute and relative errors:

Raw output files are generated at:

  • benchmark/results/timings.csv
  • benchmark/results/timings_full.md
  • benchmark/results/timings_summary.md

Timing Table at Fixed Accuracy Target

DimFunctionFTS adaptiveFTS quadFTS avxQuadGKHCubatureCubature hCubature pCuba VegasCuba DivonneCuba CuhreFastGauss
1D1/(1+25x^2)711.0000694.0000387.0000545.00001.551e+041.238e+041.492e+04n/an/an/a113.0000
1D1/sqrt(1-x^2)597.0000453.0000309.00007351.00002.061e+052.839e+051164.0000 *n/an/an/a1.294e+04 *
1Dlog(1-x)1180.0000531.0000403.00003932.00005.093e+046.568e+041437.0000 *n/an/an/a1.199e+04
1Dsin^2(1000x)1.548e+052.860e+052.855e+041.020e+041.014e+059.308e+041089.0000 *n/an/an/a3.402e+04
1Dx^6 - 2x^3 + 0.51065.0000608.0000372.0000436.00004320.00002215.00003752.0000n/an/an/a72.0000
2D1/sqrt((1-x^2)(1-y^2))2612.00002796.00001840.0000n/a5.560e+072.611e+071972.0000 *7.539e+07 *9.310e+07 *7.375e+07 *n/a
2Dexp(x+y)1.653e+041.786e+045241.0000n/a1.254e+054.318e+043.683e+048.878e+07 *8.181e+076.532e+04n/a
2Dx^2 + y^22612.00003541.00001100.0000n/a5709.00002222.00005633.00008.446e+07 *7.947e+075.554e+04n/a
3D1/sqrt((1-x^2)(1-y^2)(1-z^2))8.183e+048.129e+041.902e+05n/a3.347e+07 *2.373e+07 *4049.0000 *1.314e+08 *1.257e+08 *1.130e+08 *n/a
3Dexp(x+y+z)9.342e+059.459e+059.456e+05n/a3.523e+052.684e+056.155e+051.156e+08 *1.219e+08 *1.385e+05n/a
3Dx^2y^2z^25.733e+045.860e+041.158e+04n/a1.086e+077.414e+062.071e+041.198e+08 *1.293e+08 *3.862e+07n/a

* indicates the method did not meet the requested tolerance on that case. FTS avx uses the N inferred from adaptive FTS convergence. FastGauss (1D) uses its own minimal N that meets tolerance (if found).

Benchmark Summary Figure

This summary shows speedup of FTS quad and FTS avx relative to the fastest accurate competing method on each benchmark case. It also overlays FTS avx from Julia 1.12 (LoopVectorization-active) as a separate marker so the version-dependent SIMD behavior is explicit. Values greater than 1 indicate faster performance.

Benchmark speedup summary

Running Benchmarks

julia --project=benchmark benchmark/benchmarks.jl