开发者

Is there any good known file based key->value datastructure available in c++?

开发者 https://www.devze.com 2023-01-15 20:34 出处:网络
Is there any good file开发者_如何学JAVA based key->value data-structure available in c++. similar to std::map(template based) with a insert/delete/get of O(logn).STXXL - Standard Template Library for

Is there any good file开发者_如何学JAVA based key->value data-structure available in c++.

similar to std::map(template based) with a insert/delete/get of O(logn).


STXXL - Standard Template Library for XXL Data Sets implements file-based containers.

It's stxxl::map is quite similar to std::map, based on B+ tree with an insert/delete/get of O(logn).


You could look at Oracle Berkeley DB it provides the underlying key, data storage mechanism that you require or as already suggested sqlite.


Perhaps you can add your own template mechanism to Databases like redist. If you have a string-based database, you need some methods to serialize/deserialize your own objects. Perhaps Google Protocol Buffers or a custom JSON/XML exporter/importer does that for you, depends whether you just want speed or easy to use.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号