Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-5920

[classlib][pack200][performance] ArrayList usage optimization

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0M7
    • Component/s: None
    • Labels:
      None
    • Environment:
      Latest pack200
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Novice

      Description

      1. Microbenchmark on Sun 1.6.0_05 shows that iterating ArrayList via iterators is 3x slower than iterating via get(). This issue eliminates iterator() in favor of get().
      2. ArrayList-s are frequently instantiated with default capacity, even when the storage size is known. This issue sets the default capacities where applicable.

        Attachments

        1. pack200-arraylist-v3.patch
          40 kB
          Aleksey Shipilev

          Issue Links

            Activity

              People

              • Assignee:
                sjanuary Sian January
                Reporter:
                aleksey.shipilev Aleksey Shipilev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: