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

Improved performance #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Improved performance #23

wants to merge 1 commit into from

Conversation

KlemenPl
Copy link

@KlemenPl KlemenPl commented Sep 4, 2020

It may not seem significant, however, if you have a lot of text to process it will be very slow. That regex pattern is also very lengthy and takes up a lot of space. My method enumerates over the words and checks, if it is in a stop_words set which significantly speeds it up. In the end it does the same operations as the regex, however it is much faster. Around 20x faster.

It may not seem significant, however, if you have a lot of text to process it will be very slow. That regex pattern is also very lengthy and takes up a lot of space. My method enumerates over the words and checks, if it is in a stop_words set which significantly speeds it up. It performs same operation as the regex, however it is much faster. Around 20x faster.
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