]> git.neil.brown.name Git - wiggle.git/commit
diff: trim endpoints of search more agressively.
authorNeilBrown <neil@brown.name>
Sun, 6 Sep 2020 22:22:57 +0000 (08:22 +1000)
committerNeilBrown <neil@brown.name>
Mon, 7 Sep 2020 06:32:14 +0000 (16:32 +1000)
commit6cb79244105be99f3f9e24e89b9a594211b594a9
treecd86a83ff53d7b279b0c104a1ea0fd503edd05d5
parent67abbaab669724ce75ca0c5088c13310e145901a
diff: trim endpoints of search more agressively.

When we find a long snake, we significantly reduce the worst-case
result (which is "no more snakes ever").  This allows us to trim the
end-points of the search-font.  If the endpoints have a best-case that
is worst than the worst-case when using the new snake, there is no point
pursuing them.
Previously we only trimmed the ends one step for each step forward.
This is unnecessarily cautious.  It is better to keep trimming until
the best-case at the end reaches the worst-case.

This improves one test case about 20%.

Signed-off-by: NeilBrown <neil@brown.name>
diff.c