When difference is found, the rest of the buffer can be skipped.