jpountz commented on issue #1043: LUCENE-9071: Speed up BM25 scores.
URL: https://github.com/apache/lucene-solr/pull/1043#issuecomment-562194793
 
 
   I understand it's surprising that this approach worked, but I've been able 
to reproduce it consistently with luceneutil, including by swapping the base 
and patch in order to avoid any bias due to which competitor runs first. I also 
confirmed it via microbenchmarks. I wonder whether there is something special 
about my CPU.
   
   I've been exploring other ideas and found an approach that yields almost 
exactly the same speedups but is simpler. The way it works is by rewriting the 
BM25 formula from `weight * (freq / (freq + norm))` to `weight - weight / (1 + 
freq * (1/norm))`. This formula doesn't need double promotion in order to 
guarantee monotonicity on `freq` or `norm`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to