martinus / unordered_dense

A fast & densely stored hashmap and hashset based on robin-hood backward shift deletion
MIT License
898 stars 72 forks source link

Save to file and load from file #72

Closed Noname400 closed 1 year ago

Noname400 commented 1 year ago

we suggest adding save and load functions, this would make it much easier to work with large amounts of data

martinus commented 1 year ago

Serialization is highly specific to whatever data types you have, so I don't think it makes sense to implement this as part of the map.

I have an API though to give you raw access to the underlying container, so when you implement save/load for an std::vector, you are all good; you can e.g. use values() and replace()