Most memory efficient way to grow an array in Java?

前端 未结 12 1232
陌清茗
陌清茗 2020-12-13 19:18

I\'m not too concerned about time efficiency (the operation will be rare), but rather about memory efficiency: Can I grow the array without temporarily having all th

12条回答
  •  [愿得一人]
    2020-12-13 20:18

    Have you looked at GNU Trove for highly efficient java collections? Their collections store primatives directly for much better memory usage.

提交回复
热议问题