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

(coll) optimization for ArrayList.addAll

    XMLWordPrintable

Details

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

    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

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

            Dates

              Created:
              Updated:
              Imported:
              Indexed: