Skip to content

Remove cloning in generic_damerau_levenshtein - #75

Open
Unparalleled-Calvin wants to merge 1 commit into
rapidfuzz:mainfrom
Unparalleled-Calvin:main
Open

Unparalleled-Calvin wants to merge 1 commit into
rapidfuzz:mainfrom
Unparalleled-Calvin:main

Conversation

@Unparalleled-Calvin

Copy link
Copy Markdown

Hi there! This PR modifies the generic_damerau_levenshtein implementation to:

  • Use borrowed elements (&Elem) as HashMap keys instead of owned values
  • Eliminate unnecessary .clone() calls
  • Allow broader use cases for types where cloning is expensive or impossible

Benefits:

  • Faster execution
  • Supports non-Clone element types
  • Reduces memory allocations

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant