Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1177

Improve indexOf performance when called multiple times

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.10
    • None
    • None

    Description

      The indexOf methods search for a single entry in an array.
      This works fine when only the first matching entry is needed, however it is not so efficient when all matches are needed (because of the setup/teardown overheads).

      It might be useful to introduce an indexesOf method that returns a BitSet containing all the matches.
      This can then be used in the removeAllOccurrences methods.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sebb Sebb
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 10m
                  3h 10m