[ 
https://issues.apache.org/jira/browse/LUCENE-5258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13789005#comment-13789005
 ] 

Ted Dunning commented on LUCENE-5258:
-------------------------------------

So I whipped up a quick test and find that the dot product form seems a bit 
slower.

I also tested with Math.cos and Math.asin and find that haversin runs almost 
twice faster if you avoid the fancy "fast" math stuff (at least on my laptop).  
The actual times are about 1.6 microseconds versus about .85 microseconds.  
Your mileage *will* vary on micro-benchmarks, of course.


> add distance function to expressions/
> -------------------------------------
>
>                 Key: LUCENE-5258
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5258
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: modules/other
>            Reporter: Robert Muir
>             Fix For: 5.0, 4.6
>
>         Attachments: LUCENE-5258.patch
>
>
> Adding this static function makes it really easy to incorporate distance with 
> the score or other signals in arbitrary ways, e.g. score / (1 + 
> log(distance)) or whatever.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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

Reply via email to