Java large datastructure for storing a matrix

后端 未结 9 2084
北恋
北恋 2021-01-13 02:17

I need to store a 2d matrix containing zip codes and the distance in km between each one of them. My client has an application that calculates the distances which are then s

9条回答
  •  情深已故
    2021-01-13 02:58

    Can you simply boost the memory available to the JVM ?

    java -Xmx512m ...
    

    By default the maximum memory configuration is 64Mb. Some more tuning tips here. If you can do this then you can keep the data in-process and maximise the performance (i.e. you don't need to calculate on the fly).

提交回复
热议问题