lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3795) Replace spatial contrib module with LSP's spatial-lucene module
Date Thu, 15 Mar 2012 21:28:39 GMT


Yonik Seeley commented on LUCENE-3795:

bq. I'd be very surprised to hear if this is true.

If Math.toRadians had been written as x*(PI/180.0) then the compiler would have done constant
folding and it would simply be multiplication by a constant.  But it's unfortunately written
as x/180.0*PI (for no good reason in this case), and the compiler/JVM is not allowed to do
the simple transformation by itself.  That's why we do it.

Sometimes knowing how optimizers work and the restrictions on them allow one to know what
will be faster or slower without benchmarking.  I did benchmark it after the fact (after you
questioned it), and it was indeed the case that Math.toRadians was much slower than a simple

> Replace spatial contrib module with LSP's spatial-lucene module
> ---------------------------------------------------------------
>                 Key: LUCENE-3795
>                 URL:
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: modules/spatial
>            Reporter: David Smiley
>            Assignee: David Smiley
>             Fix For: 4.0
> I propose that Lucene's spatial contrib module be replaced with the spatial-lucene module
within Lucene Spatial Playground (LSP).  LSP has been in development for approximately 1 year
by David Smiley, Ryan McKinley, and Chris Male and we feel it is ready.  LSP is here:
 and the spatial-lucene module is intuitively in svn/trunk/spatial-lucene/.
> I'll add more comments to prevent the issue description from being too long.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message