title: Most memory-efficient map in java
body: <p>I am implementing a tree-like structure using the <code>Map</code> interface like the following declaration:</p>
  
  <pre><code>Map&lt;String, Map&lt;String, Map&lt;Integer, Double&gt;&gt;&gt;
  </code></pre>
  
  <p>Currently I am using the <code>HashMap</code> implementation.
  After loading a huge amount of data, I am seeing the program consume 4GB of RAM.
  On persisting the whole entity using the <code>Serializable</code> interface, the resulting file's size is just 1GB.</p>
  
  <p>What is the most memory-efficient <code>Map</code> implementation that I could use here?</p>