This program was further sped up (by about a factor of 2) with an A * search heuristic computed by additional code.
our admissible outside heuristic for aligning two substrings estimated the cost of aligning the words outside those substrings as if reordering those words were free.