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

reduce OSADamerau–Levenshtein space complexity from O(m*n) to O(3 * min(m*n)) #17

Merged
merged 1 commit into from Jul 3, 2022

Conversation

tang-hi
Copy link
Contributor

@tang-hi tang-hi commented Jul 2, 2022

Hi,this is the pr for issue.
I run the benchmark on OSADamerauLevenshtein.
Here is the result.

name before after alloc_before alloc_after
sameLengthStringInput 3389 ns/op 2416 ns/op 23 allocs/op 4 allocs/op
pneumonoultramicroscopi 15462 ns/op 10253 ns/op 51 allocs/op 8 allocs/op
こにんちこにんちこに 4027 ns/op 3342 ns/op 18 allocs/op 4 allocs/op
I_love_horror_movi 4282 ns/op 3073 ns/op 22 allocs/op 4 allocs/op

@hbollon hbollon added the enhancement New feature or request label Jul 3, 2022
Copy link
Owner

@hbollon hbollon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What an amazing improvement! Thanks a lot for your work!
All tests are successful so I didn't see any reasons to don't merge that 😉

@hbollon hbollon merged commit 37da2e1 into hbollon:master Jul 3, 2022
@tang-hi
Copy link
Contributor Author

tang-hi commented Jul 4, 2022

What an amazing improvement! Thanks a lot for your work! All tests are successful so I didn't see any reasons to don't merge that 😉

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants