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

(coll) optimization for ArrayList.addAll

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 5.0
    • core-libs

      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.

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

              Created:
              Updated:
              Imported:
              Indexed: