lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3654) Optimize BytesRef comparator to use Unsafe long based comparison (when possible)
Date Sun, 18 Dec 2011 01:41:31 GMT

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

Uwe Schindler commented on LUCENE-3654:
---------------------------------------

Nice, I remember Jason brought this up!

My problem is only: sun.misc.Unsafe is undocumented, so it might not be available on compile
time. Can we handle that somehow without reflection, maybe in a separate file where we dont
fail if the javac ant task fails? I know, Unsafe is always available, but I dont want to rely
on it - maybe someone wants to compile our code with SomeStrangeJDK™.
The other thing is the inner class holder. Can we rename it to not contain "lexicographical",
maybe UnsignedByteComparatorHolder? Lucene works on byte[] that can be anything, even binary
terms.
                
> Optimize BytesRef comparator to use Unsafe long based comparison (when possible)
> --------------------------------------------------------------------------------
>
>                 Key: LUCENE-3654
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3654
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: core/index, core/search
>            Reporter: Shay Banon
>         Attachments: LUCENE-3654.patch
>
>
> Inspire by Google Guava UnsignedBytes lexi comparator, that uses unsafe to do long based
comparisons over the bytes instead of one by one (which yields 2-4x better perf), use similar
logic in BytesRef comparator. The code was adapted to support offset/length.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message