Skip to content

Two performance improvements for new diff algorithm #427

Description

@prettydiff

Two potential performance improvements to investigate. The first one comes from user redditpirateroberts on Reddit.

  • Read from both samples in a single loop instead of separate loops for each sample.
  • Change the counts object from a hash map to an array as array indexes are faster to access, so convert: table[one[a]] = {one:0, two:1} instead to table[one[a]] = [0, 1]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions