I have to store key value pairs in java which is more memory efficient and which is more time efficient while reading and writing directly in file?
- Table in guava
<string,double,double> - map in guava
<string,object>where object contain two double values. - Hashmap in java
<string,object>where object contain two double values.
also you can suggest some other methods.
The most efficient is likely to be
Map<String, double[]>Whether you use Guava or not I don’t imagine making much difference.