Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-5856

remove useless & 0x3f from *BitSet.get and company

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.10, 6.0
    • None
    • None
    • New

    Description

      java specification says:

      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.

      and x86 works the same way.

      if we remove this, we just see less instructions with printassembly...

      Attachments

        1. LUCENE-5856.patch
          12 kB
          Robert Muir

        Activity

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment