Commit Graph

15 Commits

Author SHA1 Message Date
Maxime Coste
793c2ed9cf Slight style change 2017-07-17 19:29:57 +02:00
Maxime Coste
d90cd6de77 Refactor find_diff_rec and detect kept prefix/suffixes early
Certain cases, like diffing an empty buffer with a big buffer, were
very slow, now this should get better as we will directly detect the
matching eol at the end of both buffers, end then immediatly detect
we need to add the rest of the big buffer.

We still are too slow on some general diff when there is a lot of
differences.
2017-07-17 13:30:11 +02:00
Maxime Coste
388ada8142 Remove MirroredArray for diff implementation
We can index native arrays negatively, so just setup V1 and V2 to
point in the middle of the work arrays and remove the need for
creating MirroredArray.
2017-07-17 19:28:52 +09:00
Maxime Coste
5eae7aacc7 Small code cleanup in diff implementation 2017-07-15 17:17:27 +09:00
Maxime Coste
2b6fc6beb7 Remove unused Diff::posA field 2017-01-29 12:49:52 +00:00
Michael Vetter
71f6ee3234 Remove trailing whitespaces 2015-11-19 16:31:00 +01:00
Maxime Coste
c1b9ea4d1e Formatting tweak 2015-07-13 13:57:43 +01:00
Maxime Coste
9f46d75b27 Add headers guard to diff.hh along with a comment about the algorithm 2015-05-19 19:46:24 +01:00
Maxime Coste
38bbecef62 Fix bug in diff implementations (missing snake after d=1 change) and refactor 2015-05-18 22:59:59 +01:00
Maxime Coste
0a6ad4dcf4 Only initialize element 1 in mirrored arrays. 2015-05-17 20:13:11 +01:00
Maxime Coste
73ddf18dc3 Another bug fix in diff implementation 2015-05-15 13:55:39 +01:00
Maxime Coste
e9af3a4217 always_inline a few methods 2015-05-14 19:05:41 +01:00
Maxime Coste
cc97d4ba41 Fix bugs in diff implementation 2015-05-14 13:57:03 +01:00
Maxime Coste
7a8c2d7f56 Fix diff implementation and change the Diff struct format 2015-05-13 23:22:29 +01:00
Maxime Coste
49def73e4e Add initial diff implementation based Eugene W. Myers' algorithm 2015-05-12 23:41:35 +01:00