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

(coll) optimization for ArrayList.addAll

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      In ArrayList.addAll, you might check to see if the collection being added is an ArrayList, and if so, directly copy the elements rather than allocating a separate array, copying the collection into the array, and then from the array to the ArrayList. This turned out to be a hot spot in our code.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mmcclosksunw Michael Mccloskey (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported:
                Indexed: