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

ASF subversion and git services commented on LUCENE-5856:
---------------------------------------------------------

Commit 1614790 from [~rcmuir] in branch 'dev/branches/branch_4x'
[ https://svn.apache.org/r1614790 ]

LUCENE-5856: Optimize Fixed/Open/LongBitSet to remove unnecessary AND

> remove useless & 0x3f from *BitSet.get and company
> --------------------------------------------------
>
>                 Key: LUCENE-5856
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5856
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Robert Muir
>             Fix For: 5.0, 4.10
>
>         Attachments: LUCENE-5856.patch
>
>
> java specification says:
> {quote}
> If the promoted type of the left-hand operand is long, then only the six 
> lowest-order bits of the right-hand operand are used as the shift distance. 
> It is as if the right-hand operand were subjected to a bitwise logical AND 
> operator & (ยง15.22.1) with the mask value 0x3f (0b111111). The shift distance 
> actually used is therefore always in the range 0 to 63, inclusive.
> {quote}
> and x86 works the same way.
> if we remove this, we just see less instructions with printassembly...



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to