title: Reuse hashmaps in array
body: <p>I am holding an array of hashmaps, I want to gain maximum performance and memory usage so I would like to resue the hashmaps inside an array.</p>
  <p>So when there is a hashmap in the array that is not needed any more and I want to add new hashmap to the array I just clear the hashmap and use put() to add new values.</p>
  <p>I also need to copy back values when I retireve hashmap from array.</p>
  <p>I am not sure if this is better than creating <code>new HashMap()</code> every time.
  What is better?</p>
  <p><strong>UPDATE</strong></p>
  <p>need to cycle about 50 milions of hashmaps, each hash map has about 10 key-value pairs. If size of the array 20,000 I need just 20,000 hashmaps instead of 50 milions new hashmaps()</p>