Today I learnt about a cunning trick used by GNU diff to make Myer's algorithm faster: https://github.com/mitsuhiko/similar/issues/15 If you do an initial pass to find items that only occur on one side, you can discard them before diffing! They'll always be shown as changed.