Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions docs/perf.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<--
Expand All @@ -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.

Expand Down