| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…window of 10 lines, and picks "the first" pair within the current window with a ratio > cutoff to synch on. This should make cubic-time cases impossible. It may change results in some cases, but I don't think I care - difflib is fundamentally opposed to synching on lines "far apart", and using a window enforces a notion of locality.
Stop tresting junk lines specially - if we synch on junk, so be it - it almost never occurs in real life anyway.
…ython#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.
From python/cpython#119492, "This may change results in some cases, but no natural ones come to mind, and I don't care about contrived cases." and also "Correctness of diffs is not affected. Some similar lines far apart may be reported as deleting one and adding the other, where before they were displayed on adjacent output lines with markup showing the intraline differences.". This change breaks the test for Python3.14
| Back | FazBrowse Home | New Git URL |
Make it impossible for Differ.compare() to degenerate to cubic-time. This may change results in some cases, but no natural ones come to mind, and I don't care about contrived cases.