Convert Boxed Arrays to primitive arrays

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P5
    • tbd
    • Affects Version/s: 7, 9, 10
    • Component/s: hotspot
    • generic
    • generic

      Filed on behalf of Misha Dmitriev.

      A boxed primitive (i.e. Integer, Long, Boolean, etc) consumes a lot more space on the heap. Arrays of boxed primitives consume 28% of the heap space. Consider converting the arrays of boxed primitives into primitive arrays (i.e. Object[] to int[]). If a non-int object is added to the array, then automatically convert the array back to Object[].

            Assignee:
            Unassigned
            Reporter:
            Nathan Reynolds
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: