You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Adrien Grand (Jira)" <ji...@apache.org> on 2021/10/04 13:27:00 UTC

[jira] [Commented] (LUCENE-10145) Use VarHandles to speedup byte[] comparisons in some cases

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

Adrien Grand commented on LUCENE-10145:
---------------------------------------

With the linked PR I got 13% faster merging for points with the NYC Taxis benchmark, thanks to changes to BKDMergeQueue. Since this helped significantly, I generalized the approach to other places where we keep comparing fixed numbers of bytes and this number of bytes is often 4 or 8 such as PointRangeQuery.

> Use VarHandles to speedup byte[] comparisons in some cases
> ----------------------------------------------------------
>
>                 Key: LUCENE-10145
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10145
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I noticed that using Long#compareUnsigned on longs read via VarHandles is significantly faster than calling compareUnsigned directly. There are cases when this could be leveraged easily such as BKDWriter, which often keeps comparing 4-bytes or 8-bytes across byte[] arrays.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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