Basic implementation of the standard diff algorithm.
