I have just learned about trove library and how it's more memory efficient than JDK's Maps. I was previously using a hash map to store totalSize = 2^N
double array entries, as follows:
final Map myTable = new HashMap(totalSize);
I was wondering if there is an equivalent class in Trove? or if there is a way to use Class TIntDoubleHashMap that makes the same collection as myTable HashMap?
I would appreciate any help/suggestion.
A double[]
is, in fact, an object, so you should probably just use TIntObjectHashMap<double[]>
.