Memory-efficient sparse array in Java

前端 未结 5 585
野趣味
野趣味 2020-11-29 10:17

(There are some questions about time-efficient sparse arrays but I am looking for memory efficiency.)

I need the equivalent of a List or

5条回答
  •  遥遥无期
    2020-11-29 11:16

    I have saved my test case as jglick/inthashmap. The results:

    HashMap size: 1017504
    TIntObjectMap size: 853216
    IntHashMap size: 846984
    OpenIntObjectHashMap size: 760472
    

提交回复
热议问题