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

Refactor Template matching use in function. #590

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bosd
Copy link
Collaborator

@bosd bosd commented Dec 19, 2024

Use pythons in function for template matching of keywords.
We only need to know if the keywords is thee.
We don't need the advanced features and addicitional cost of regexes.

in function is python is generally much faster then a regular expression.
https://stackoverflow.com/questions/19911508/python-speed-for-in-vs-regular-expression

bosd added 2 commits December 19, 2024 20:00
Pythons in method can be a lot faster instead of finding it with a regex.
Accoring to the Pycon talk about regex performance, the built in is 1360% faster.
@bosd bosd added the performance Performance label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant