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

benchmark using difflib's SequenceMatcher #100

Open
thatbudakguy opened this issue Aug 21, 2020 · 0 comments
Open

benchmark using difflib's SequenceMatcher #100

thatbudakguy opened this issue Aug 21, 2020 · 0 comments
Milestone

Comments

@thatbudakguy
Copy link
Member

see the docs on Differ, which offer:

The basic Ratcliff-Obershelp algorithm is cubic time in the worst case and quadratic time in the expected case. SequenceMatcher is quadratic time for the worst case and has expected-case behavior dependent in a complicated way on how many elements the sequences have in common; best case time is linear.

if performance for expected inputs (i.e. the kanripo corpus) is asymptotically linear, it might be worth swapping out the index-based method to instead diff the two doc's sets of ngrams, as in text-matcher.

@thatbudakguy thatbudakguy transferred this issue from another repository Aug 23, 2020
@thatbudakguy thatbudakguy added this to the v2.1 milestone May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant