Help optimizing 1000x Zygote overhead for linear interpolation

I’m not sure about this but have you tried simply removing the closure to see how this affects the running time?