comparediffbeyondcomparebeyondcompare3

How does the Beyond Compare diff algorithm work?


I'm curious to know how does the diff algorithm of 'Beyond Compare' work?

I guess there's a standard (well-known?) diff algorithm they used to implement the "character .vs. character" comparison. Do you know the name of this diff algorithm? Thank you


Solution

  • Beyond Compare uses a number of different algorithms depending on the file type and configuration. In v4 the line alignment algorithms are explicitly named in the interface:

    The character alignment to highlight differences within lines is based on the Myers O(ND) algorithm with some post-processing to clean up the results.

    The alignment setting can be configured by clicking the Rules button Beyond Compare rules button

    which brings up this dialog, which you can then configure for session scope or with a persistent default against the file association.

    Beyond Compare alignment settings