[ANN] FastInterpolations.jl — Fast & zero-allocation ND interpolation

Hello everyone,

I’d like to share FastInterpolations.jl, a high-performance N-dimensional interpolation package I’ve been working on.

I originally developed this for plasma physics simulations where interpolation sits inside tight inner loops that could run millions of times per timestep. Performance was the primary goal, but I also wanted to eliminate allocations entirely on the hot path — even small ones add up and become noticeable at that scale. On top of that, I needed seamless support for non-uniform rectilinear grids in N-dimensions.

To address this, FastInterpolations.jl is built around four main design goals:

  • High-performance: Typically 2-10x faster for standard problems, with up to >100x speedup for multiple series sharing the same grid (SeriesInterpolant).

  • Zero allocation: No GC pressure in tight loops after warm-up.

  • ND non-uniform grids: Works on any rectilinear grid (uniform or non-uniform) with a clean API that mirrors 1D.

  • Physical boundary conditions: Explicitly set physical boundary conditions (e.g., Neumann, periodic) per endpoint.

Beyond the core performance, it includes several useful features, including exact analytic derivatives, integration, and seamless compatibility with Complex values and AD tools.

Performance

Here is a one-shot benchmark (construction + evaluation per call) for 1D cubic spline interpolation against other popular interpolation packages:

If you have workflows that bottleneck on interpolations, feel free to give it a try. Feedback and issues are always welcome!

10 Likes

Construction + evalution, butn ormally you construct once and evaluate millions of times. So what’s the evaluation timing?

Thank you very much for this! I tested it to solve a PDE using semi-Lagrangian method and yes, it is really fast !

Is it possible to use the interpolant optimization when they share the same initial grid but the query points are different for each series and gain some time ?