gh-119105: Differ.compare is too slow [for degenerate cases] (#119492)
``_fancy_replace()`` is no longer recursive. and a single call does a worst-case linear number of ratio() computations instead of quadratic. This renders toothless a universe of pathological cases. Some inputs may produce different output, but that's rare, and I didn't find a case where the final diff appeared to be of materially worse quality. To the contrary, by refusing to even consider synching on lines "far apart", there was more easy-to-digest locality in the output.
T
Tim Peters committed
de19694cfbcaa1c85c3a4b7184a24ff21b1c0919
Parent: 84be524
Committed by GitHub <noreply@github.com>
on 5/25/2024, 3:08:21 AM