Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-determinism in diffing algorithm #247

Merged
merged 1 commit into from
Nov 24, 2020
Merged

Fix non-determinism in diffing algorithm #247

merged 1 commit into from
Nov 24, 2020

Commits on Nov 24, 2020

  1. Fix non-determinism in diffing algorithm

    A previous attempt to add non-determinism to the diffing algorithm
    unfortunately broke the algorithm for half the cases.
    
    This change modifies the algorithm to truly switch between starting
    with a forward search versus a reverse search.
    The main for-loop of Difference would switch repeatedly between
    performing a forward search, then a reverse search, and vice-versa.
    Since we can't jump into the middle of a for-loop to start with the
    reverse search first, we use a series of labels and goto statements
    to accomplish the same effect.
    
    Fixes #238
    dsnet committed Nov 24, 2020
    Configuration menu
    Copy the full SHA
    18c5d48 View commit details
    Browse the repository at this point in the history