Dynamic Time Warping algorithm with AccelerationArray