Optimized cubic interpolation