c++ - What is the best way to implement a threshold into a hash? -
i want implement following in c++:
- hash x(ballpark figure: 1 digit millions) 64 bit integers
- output elements occurrence >= y (user specified) binary file
right now, code hashes & outputs every element , not regard low occurrencies.
the obvious solution refactor code in way hashes not integer struct. contains integer , counter, checked being >=y before outputting elements binary file. bottomline memory footprint increase x*size_of(counter).
is there more sophisticated way of accomplishing task?
Comments
Post a Comment