PHANTOM
🇮🇳 IN
Skip to content

speed optimization#46

Open
jankovicsandras wants to merge 3 commits intodorianbrown:masterfrom
jankovicsandras:master
Open

speed optimization#46
jankovicsandras wants to merge 3 commits intodorianbrown:masterfrom
jankovicsandras:master

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