(coll) optimization for ArrayList.addAll

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 5.0
    • Component/s: 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.

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

              Created:
              Updated:
              Imported:
              Indexed: