Benchmarks / Competitors
Competitors: basin vs argmin, gomez, and nlopt, convergence over time
basin against argmin, gomez, and nlopt. Each library has only the algorithms it ships, so coverage varies:
argmin lines up on GD, NM, and L-BFGS, gomez on derivative-free NM only,
and nlopt on NM, L-BFGS, and NEWUOA. Most cases pit different
implementations of the same family against each other; the NEWUOA case
is the exception: basin and nlopt run the same Powell algorithm
(matched ρ_beg/ρ_end), and it's the only case off Rosenbrock
(Styblinski–Tang at n = 5). Because no two implementations share a code
path, a single mean solve time would hide the differences in path and
per-iteration cost. Instead each chart plots suboptimality f(x) − f* against wall-clock time on log–log axes: how far down the
objective each library gets, and how long it spends getting there. Lower and
further left is better.
Gradient Descent · Rosenbrock
Steepest descent with a More–Thuente line search: first-order, identical configuration on both sides.
Nelder–Mead · Rosenbrock
Derivative-free Nelder–Mead. basin and argmin run from a bit-identical initial simplex (standard coefficients); gomez and nlopt construct their own simplex with their default coefficients. nlopt's curve is a per-eval best-so-far trace (no per-iteration hook), the others are per-iteration raw cost. The implementations diverge in path and per-iteration cost.
L-BFGS · Rosenbrock
Limited-memory BFGS (m = 10), quasi-Newton; basin and argmin both use a More–Thuente line search; nlopt uses its bundled L-BFGS (no line-search knob exposed). nlopt's curve is a per-eval best-so-far trace; the others are per-iteration raw cost.
NEWUOA · Styblinski–Tang
Powell's model-based derivative-free NEWUOA, the same algorithm in two implementations: basin vs nlopt's LN_NEWUOA, with matched ρ_beg/ρ_end and npt = 2n+1. The only case off Rosenbrock, the multimodal Styblinski–Tang at n = 5 from the origin, where the quadratic-model method has more to chew on and both implementations descend to the global minimum. Both run to natural ρ-convergence (not the iteration cap). nlopt's curve is a per-eval best-so-far trace; basin's is per-iteration.
Measured 2026-06-21 on AMD Ryzen 9 7900 12-Core Processor
(linux/x64). All libraries run on the Vec<f64> backend (gomez through its
own bundled nalgebra::DVector<f64>). The GD,
NM, and L-BFGS cases run from the classic Rosenbrock start to a
200-iteration cap (a cap: the quasi-Newton case converges
first, and gomez's NM hits its internal no-progress stop before the
budget); the NEWUOA case instead runs on Styblinski–Tang (n = 5) from
the origin to natural ρ-convergence. Each point is the median wall-clock
time per iteration over repeated runs (nlopt, which exposes no
per-iteration hook, is sampled per function evaluation as a best-so-far
curve); the solvers are deterministic, so only the timing varies.
Absolute times are machine-specific; compare the curves within a chart,
not across machines.
To watch basin's solvers converge interactively, try the visualizer.