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

speed optimization #46

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

Conversation

jankovicsandras
Copy link

Hi

The speed optimization we discussed. I haven't removed anything, just added some precalculation after Line 107 and a get_scores2(), because we just want to compare the speeds of this and get_scores().

I added a new testfile speed-test-wordpress.py which has output like this:

samplenum: 1000 | verbose: False | epsilon: 1e-05
get_scores time sum :  1.2493748664855957 s | get_scores2 time sum :  0.7079489231109619 s | errors sum :  0

TODOs:

  • The optimization is only for BM25Okapi now, the other algorithms are not changed.
  • This is still without numpy, but it should be easy to add it, see lines 117 and 145

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