Map alternative for primitive values
问题 I did some profiling on my application and one of the results turned out that about 18% of memory on the heap is used by objects of type Double . It turns out these objects are the values in Map s, where I cannot use the primitive type. My reasoning is that the primitive type of double consumes less memory than it's object Double . Is there a way to have a map like data structure, that would accept any type as key and a primitive double as values? Main operations would be: insertion (probably