Vectorize and inline the delta calculation.