XAD

AAD benchmarks

XAD against CppAD, Adept and autodiff on four finance workloads, with the same code, inputs and machine for every tool and every gradient checked. XAD is the fastest on all four on its own, and further ahead with code generation.

4.9–24×faster than the fastest of CppAD, Adept and autodiff, with XAD code generation
1.1–4.1×faster with XAD alone, without code generation, on all four workloads
1e-10every tool's gradient matches XAD's to within this relative difference

All sensitivities, counted in valuations

Time for the value and every sensitivity, as a multiple of one plain valuation. With code generation, every sensitivity together costs less than one valuation; bumping needs two valuations per input plus one. Log scale.

XAD with code generationXADAdept, CppAD, autodiffBumping, estimated
Swaption portfolio, LMM 1 10 100 1,000 XAD, code generation0.90 XAD3.8 Adept4.4 CppAD14 autodiff353 Bumping319 plain valuations, log scale Swaption portfolio, LMM 1 10 100 1,000 XAD, code generation0.90 XAD3.8 Adept4.4 CppAD14 autodiff353 Bumping319 plain valuations, log scale
Heston Monte Carlo 1 10 100 1,000 XAD, code generation0.37 XAD2.3 Adept3.4 CppAD8.4 autodiff7.5 Bumping15 plain valuations, log scale Heston Monte Carlo 1 10 100 1,000 XAD, code generation0.37 XAD2.3 Adept3.4 CppAD8.4 autodiff7.5 Bumping15 plain valuations, log scale
CVA on a swap portfolio 1 10 100 1,000 XAD, code generation0.36 XAD6.2 Adept10 CppAD8.7 autodiff54 Bumping79 plain valuations, log scale CVA on a swap portfolio 1 10 100 1,000 XAD, code generation0.36 XAD6.2 Adept10 CppAD8.7 autodiff54 Bumping79 plain valuations, log scale
SABR calibration 1 10 100 1,000 XAD, code generation0.91 XAD3.7 Adept15 CppAD17 autodiff23 Bumping31 plain valuations, log scale SABR calibration 1 10 100 1,000 XAD, code generation0.91 XAD3.7 Adept15 CppAD17 autodiff23 Bumping31 plain valuations, log scale

Time per gradient

Median time for the value and all sensitivities, one thread. The fastest gradient per workload in bold.

WorkloadSensitivitiesOne valuationXAD, code generationXAD, tapeAdeptCppADautodiffBumping, estimated
Swaption portfolio, LMM15981.4 ms73.2 ms313 ms356 ms1.11 s28.7 s26.0 s
Heston Monte Carlo, 10,000 paths711.8 ms4.39 ms27.2 ms40.5 ms98.8 ms88.5 ms177 ms
CVA on a swap portfolio392.08 ms753 µs12.8 ms21.3 ms18.1 ms112 ms164 ms
SABR calibration, Jacobian1,5001.46 µs1.33 µs5.33 µs (forward mode)22.0 µs25.4 µs33.7 µs45.3 µs

With code generation, the gradients take less time than bumping by a factor of about 355, 40, 218 and 34, and on all four workloads less time than one plain valuation.

Measured 10 November 2026 on an AMD EPYC (Zen 5), one pinned core, GCC 15.2, Linux. XAD v2.2.0, and XAD with its code generation add-on (vectorised); Adept 2.1.3, CppAD 20250000.2, autodiff 1.1.2 (forward mode). Every tool's gradient matches XAD's to within 1e-10 relative; XAD is also checked against finite differences. XAD code generation evaluates vectorised across paths; it records and compiles once, in untimed set-up like CppAD's tape, so that one-off time is not in the timings. Bumping is estimated as central differences, two valuations per input plus one, not measured. Source, method and raw results: github.com/auto-differentiation/ad-benchmarks. Results will be updated with each XAD release.