From 789036eb67ace3e4b3d30a87916989edd12599fc Mon Sep 17 00:00:00 2001 From: James Logan Date: Thu, 13 Nov 2025 22:52:41 -0500 Subject: [PATCH] update perf docs --- docs/perf.md | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/docs/perf.md b/docs/perf.md index 18c8ab4..03688a0 100644 --- a/docs/perf.md +++ b/docs/perf.md @@ -44,23 +44,12 @@ Specialized methods (Scipy `RectBivariateSpline` and numpy `interp`), while not are shown to highlight that InterpN achieves parity even with specialized low-dimensional methods, despite not specifically handling low-dimensional special cases. -#### 1000 Observation Points +#### 1 Observation Point --8<-- -docs/throughput_vs_dims_1000_obs.html +docs/throughput_vs_dims_1_obs.html --8<-- -#### 1 Observation Point -For evaluating a single point at a time, the 1D-specialized `numpy.interp` is somewhat faster, -likely as a result of not needing to allocate for a scalar output. This discrepancy vanishes for higher -numbers of observation points. - -In this benchmark, scipy's `RectBivariateSpline` is slightly (~20%) faster for evaluating one point at a time; -however, it is interesting to note that this benchmark method heavily favors scipy's approach by pre-building -the interpolator object (which removes the timing effect of their initial linear solve for knots) and by -performing a warmup that clears an appropriately-sized region of memory for allocation. This discrepancy -also vanishes for higher numbers of observation points. - --8<-- docs/speedup_vs_dims_1_obs_linear.html --8<-- @@ -69,6 +58,21 @@ docs/speedup_vs_dims_1_obs_linear.html docs/speedup_vs_dims_1_obs_cubic.html --8<-- +#### 1000 Observation Points + +--8<-- +docs/throughput_vs_dims_1000_obs.html +--8<-- + +--8<-- +docs/speedup_vs_dims_1000_obs_linear.html +--8<-- + +--8<-- +docs/speedup_vs_dims_1000_obs_cubic.html +--8<-- + + ### 3D Throughput vs. Input Size Evaluating points in large batches is substantially faster than one-at-a-time for all tested methods.