Most efficient way to store values in unordered_set using disk space in C++?

Viewed 77

I am writing a program to remove duplicate lines in a file, and I use unordered_set to store line hashes (specifically, this library, since it is several times faster than the standard std::unordered_set)

Since sometimes the computer's RAM is not enough to process all the lines in the file, it is necessary to store some of the hashes in a container on disk (for example, something like stxxl). However, there is no unordered_set in stxxl, and besides, it does not seem to be the most optimal in terms of speed and memory consumption.

Please tell me (if possible, with code examples) - what is better to use in this case?

0 Answers
Related