You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2014/07/29 19:02:38 UTC

[jira] [Commented] (LUCENE-5856) remove useless & 0x3f from *BitSet.get and company

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

Michael McCandless commented on LUCENE-5856:
--------------------------------------------

+1, nice!

> 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
>         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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org