Anyone know of a java.util.Map implementation optimized for low memory use?

I've looked in the usual places (apache commons, google) and not been able to find one ... It should be opensource. Pretty much looking for one based on a linked list. The use case is 10'000's of maps, with not necessarily many values in. It does not need to scale up, as i can convert it when it gets too big. Some numbers, sizes using some calculated jvm values (8bytes/java.lang.Object, 4bytes/ref) the HashMap is about 100+32n bytes, the theoretical best is 12+20*n. <-- I want that, for small n.
I don't think a Map based on a linked list would be the "smallest". I'd create a array-based on without the Entry objects (i.e. the values are stored directly in the array). This means that collisions will get nasty, but there are ways to work around this.

以上就是Anyone know of a java.util.Map implementation optimized for low memory use?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏