Interpolators optimization

I’m trying to reduce the CPU usage of my plugin, and after running it through Instruments I see that my hottest function at the moment is LagrangeInterpolator.process()

What is shown in the attached pic is the instrumentation of several voices from a polyphonic synth, where each voice is using its own set of 2 Lagrange interpolators.

As can be seen, the calc function is working overtime. Make sense because each voice is doing its own stereo pitch shifting independently from other voices.

I tried using linear interpolators instead, but that didn’t do much and the CPU usage was about the same.

Does anyone have some black magic that would reduce the interpolators’ overall calculation time?

there is no way lerps (linear interpolation) does as much as lagrange. lerps are almost one liners while lagrange has multiple for loops in it. your performance issues must come from something else if lerp didn’t fix it