add the SIMD in diff function