Diff takes two texts and finds the differences. This implementation works on a character by character basis. The result of any diff may contain ‘chaff’, irrelevant small commonalities which complicate the output. A post-diff cleanup algorithm factors out these trivial commonalities.

Copied from the Demo of Diff.

Timeout: seconds. If the mapping phase of the diff computation takes longer than this, then the computation is truncated and the best solution to date is returned. While guaranteed to be correct, it may not be optimal. A timeout of ‘0’ allows for unlimited computation.

Increase human readability by factoring out commonalities which are likely to be coincidental.
, edit cost:
Increase computational efficiency by factoring out short commonalities which are not worth the overhead. The larger the edit cost, the more aggressive the cleanup.
Raw output.

Let’s rock (Ctrl+Enter)