A space efficient data structure to store and look-up through a large set of (uniformly distributed) Integers

后端 未结 7 2157
悲哀的现实
悲哀的现实 2021-01-06 22:28

I\'m required to hold, in memory, and look-up through one million uniformly distributed integers. My workload is extremely look-up intensive.
My current implementation u

7条回答
  •  孤街浪徒
    2021-01-06 23:02

    There are some IntHashSet implementations for primitives available.

    Quick googling got me this one. There is also an apache [open source] implementation of IntHashSet. I'd prefer the apache implementation, though it has some overhead [it is implemented as a IntToIntMap]

提交回复
热议问题