How should I deal with a very large array in Java?

前端 未结 7 1849
情深已故
情深已故 2021-02-04 13:48

I have an algorithm which currently allocates a very large array of doubles, which it updates and searches frequently. The size of the array is N^2/2, where N is the number of

7条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-04 14:31

    You are moving in the realm of how to write software that utilizes a cache (as in memory cache in the cpu) best. This is hard to do right, and the "right" way to do it depends on how your algorithm is designed.

    So, what does your program actually do algorithmically?

提交回复
热议问题