addthis / stream-lib

Stream summarizer and cardinality estimator.
Apache License 2.0
2.26k stars 559 forks source link

CountMinSketch with Int type in the internal table #161

Open ajtkulov opened 4 years ago

ajtkulov commented 4 years ago

The current implementation has Long type for the internal table. For a lot of real use cases, we need only Int (in general it would be great to have a generic solution, like long/int/short(?)).

For instance, I have 50M objects. It's impossible to have a value > 50M in the internal table. So, Int value is enough, in this case, Long type is a waste (in 2 times more memory consumption in comparison with Int type).