In our application we use std::map to store (key, value) data and use serialization to store that data on disk. With this approach we are finding that the disk I/O is performance bottleneck and finding values using key is not very fast.
I have come across LevelDB and thinking of using it. But I have some questions.
- LevelDB's documentation says its made for (string, string) key value pair. Does it mean that I can not use for custom key value pairs?
- It seems the difference between
std::mapand LevelDB is that LevelDB is persistent andstd::mapworks in memory. So does it mean the disk I/O bottleneck will be more problematic for levelDB.
More specifically can anybody please explain if LevelDB could be better choice than std::map?
PS: I tried using hash_maps but it appears to be slower than std::map
std::map? If not, trystd::unordered_map. - Kerrek SB