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

Replace the slow loop in Teddy with Aho-Corasick. #278

Merged
merged 1 commit into from
Sep 4, 2016

Conversation

BurntSushi
Copy link
Member

This can have a significant impact on performance when the match rate is
low (common) and the number of patterns is high (e.g., for a case
insensitive search).

This can have a significant impact on performance when the match rate is
low (common) and the number of patterns is high (e.g., for a case
insensitive search).
@BurntSushi
Copy link
Member Author

As a meta comment: it's kind of silly I didn't just do this in the first place. There's almost no downside (sans a very small additional amount of memory required) and the code is far simpler than it was before.

@BurntSushi BurntSushi merged commit d887cb2 into rust-lang:master Sep 4, 2016
@BurntSushi BurntSushi deleted the teddy-aho-corasick branch September 4, 2016 16:13
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