In our application data (long values) is caches in a HashMap as key values pairs.In a 64bit machine Hashmap is taking additional 72bits for each entry. The additional memory for each entry is greater than the size of my key and value objects put together. Please suggest if there is any object similar to HashMap and consumes less memory.
- Posted by: Thirumal Bandi
- Posted on: August 06 2008 08:00 EDT
There are many alternatives here: http://www.leepoint.net/notes-java/data/collections/ds-alternatives.html
Have you checked commons Jakarta collection components.. See http://commons.apache.org/collections/ ----------------------- jsptube.com
Frank, Dev Thanks for the links. I tried various objects (eg HashedMap from Apache) equivalent to HashMap. But there was no reduction in the memory consumption :-(