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

Add BitSet.prevSetBit, BitSet.prevClearBit

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: core-libs
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      A DESCRIPTION OF THE REQUEST :
      The BitSet methods nextSetBit and nextClearBit perform much better than what can be done otherwise using the public interface. But the opposite methods are missing, ie, prevSetBit, prevClearBit. We implement them from outside the class, but the performance drop off is significant. Please consider adding these.

      JUSTIFICATION :
      We use BitSet to represent work/non worktime in a day, and perform millions of calculations to figure out when the start/finish of work/non work time is. Finding the 'next' time is very performant, using nextClearBit/nextSetBit, but finding the previous times are much slower.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                martin Martin Buchholz
                Reporter:
                ndcosta Nelson Dcosta
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: