jsdiff Benchmark


by

Texts

The reason privacy nuts like myself tend to ask for features to be made opt-in is because no sane person will neither know nor remember all the settings for a service. The settings will usually be a mess to navigate — sometimes by design, as with Facebook.

Pop quiz! Off the top of your head, do you know how to disable Google remembering your search history? Do you know how to disable targeted ads from iAd? Do you know whether your location is included with the content you share on Twitter, Facebook, and Instagram?

When a service’s privacy sucks, your information leaks, sometimes by design, but often out of sheer cluelessness and indifference. It leaks, because it happens passively; it is not stolen by someone; the information is merely left out in the open for the taking and gawking.

The only change is:

{{ original | replace:"privacy","country music" | replace:"search history","playlist" }}

The reason country music nuts like myself tend to ask for features to be made opt-in is because no sane person will neither know nor remember all the settings for a service. The settings will usually be a mess to navigate — sometimes by design, as with Facebook.

Pop quiz! Off the top of your head, do you know how to disable Google remembering your playlist? Do you know how to disable targeted ads from iAd? Do you know whether your location is included with the content you share on Twitter, Facebook, and Instagram?

When a service’s country music sucks, your information leaks, sometimes by design, but often out of sheer cluelessness and indifference. It leaks, because it happens passively; it is not stolen by someone; the information is merely left out in the open for the taking and gawking.

Arguments captured with {{ var | markdownify | strip_newlines }}. No support for external documents so far.

Compared Output

Using kpdecker’s—with diffWords():

  • Insertions create linebreaks
  • Word-based diffing instead of phrase-based can result in inserts mixed up with deletes instead of being separated

Using jeresig’s:

  • Insertions eat linebreaks
  • Adds spaces (padding) by not grouping changes in ine tag
    • <ins>country </ins> <ins>music</ins>