by austincheney · 9y ago · 0 comments
A bit of a pickle.
The challenge I experienced with this is that either there are 6 changes (line for line comparison) or there are 3 lines the same and three lines moved, but three lines moved means a deletion of 3 lines from the first sample and 3 lines of insertion later in the second sample, which is still 6 differences. The output reads very differently, but the number of differences is identical, which is no change in precision.
I'm pretty sure exact diff in subquadratic time is therefore impossible. It's still a nice heuristic though.