Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8219922

Simplify IndexSetIterator::next using count_trailing_zeros

XMLWordPrintable

    • b11

      Currently, IndexSetIterator::next uses a 5-bit window and two lookup-tables to iteratively search for the next set bit and then shift the window forward to prepare for the next call.

      Using count_trailing_zeros this logic can be simplified and made slightly faster.

            redestad Claes Redestad
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: