Performance SnapshotΒΆ

Run python -m pyakima.demos.speed_demo to compare pyakima with the optional SciPy and pygsl_lite backends available in your environment.

The current 0.1.0 snapshot was measured on a single Apple Silicon M3 core with Python 3.14.6, Numba 0.66.0, NumPy 2.4.6, SciPy 1.17.1, and pygsl_lite 0.1.8. The demo used 50 repeats, with each repeat adaptively looped to at least 0.100 s, and a representative range of spline and caller sizes. The full benchmark is available in docs/benchmarks/m3_0_1_0_speeds.txt.

Highlights from that run:

  • pyakima was minimum 1.7x faster than SciPy Akima1DInterpolator across all benchmarks.

  • Spline creation was about 5.7-32.6x faster than SciPy.

  • With Python-call overhead, scalar evaluation was about 2.3x faster than SciPy but 0.3-0.4x slower than pygsl_lite. When called fully jitted (no Python-call overhead), scalar evaluation was about 109-361x faster than SciPy and 18-52x faster than pygsl_lite.

  • Python-call vector evaluation was faster than SciPy in every tested case (about 1.7-4.8x in the SciPy-style rows).

  • Against pygsl_lite, Python-call vector evaluation was faster once the call did enough work (for example, 1,000 or more evaluation points in the sampled cases), while scalar and tiny-vector cases can be dominated by dispatch overhead.

  • Fully jitted vector evaluation was faster than SciPy in every tested case (about 1.7-29.0x). It was also faster than pygsl_lite for most non-tiny vector workloads in the sample (about 2.3-11.2x for 1,000 or more evaluation points).

Benchmark results depend on hardware, Python/NumPy/Numba versions, and whether the call is made through Python or entirely inside jitted code.