• <small id='sWTnE'></small><noframes id='sWTnE'>

    <i id='sWTnE'><tr id='sWTnE'><dt id='sWTnE'><q id='sWTnE'><span id='sWTnE'><b id='sWTnE'><form id='sWTnE'><ins id='sWTnE'></ins><ul id='sWTnE'></ul><sub id='sWTnE'></sub></form><legend id='sWTnE'></legend><bdo id='sWTnE'><pre id='sWTnE'><center id='sWTnE'></center></pre></bdo></b><th id='sWTnE'></th></span></q></dt></tr></i><div id='sWTnE'><tfoot id='sWTnE'></tfoot><dl id='sWTnE'><fieldset id='sWTnE'></fieldset></dl></div>
      <bdo id='sWTnE'></bdo><ul id='sWTnE'></ul>

      <legend id='sWTnE'><style id='sWTnE'><dir id='sWTnE'><q id='sWTnE'></q></dir></style></legend>
      <tfoot id='sWTnE'></tfoot>

      1. 超高性能C/C++哈希图(表、字典)

        Super high performance C/C++ hash map (table, dictionary)(超高性能C/C++哈希图(表、字典))
            <tbody id='omDml'></tbody>

            <small id='omDml'></small><noframes id='omDml'>

            <legend id='omDml'><style id='omDml'><dir id='omDml'><q id='omDml'></q></dir></style></legend>

              <bdo id='omDml'></bdo><ul id='omDml'></ul>

              <tfoot id='omDml'></tfoot>
              • <i id='omDml'><tr id='omDml'><dt id='omDml'><q id='omDml'><span id='omDml'><b id='omDml'><form id='omDml'><ins id='omDml'></ins><ul id='omDml'></ul><sub id='omDml'></sub></form><legend id='omDml'></legend><bdo id='omDml'><pre id='omDml'><center id='omDml'></center></pre></bdo></b><th id='omDml'></th></span></q></dt></tr></i><div id='omDml'><tfoot id='omDml'></tfoot><dl id='omDml'><fieldset id='omDml'></fieldset></dl></div>

                1. 本文介绍了超高性能C/C++哈希图(表、字典)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我需要将原始键(int,可能是 long)映射到高性能哈希映射数据结构中的结构值.

                  I need to map primitive keys (int, maybe long) to struct values in a high-performance hash map data structure.

                  我的程序将有几百个这样的地图,每个地图通常最多有几千个条目.但是,地图会不断刷新"或搅动";想象一下每秒处理数百万条 adddelete 消息.

                  My program will have a few hundred of these maps, and each map will generally have at most a few thousand entries. However, the maps will be "refreshing" or "churning" constantly; imagine processing millions of add and delete messages a second.

                  C 或 C++ 中的哪些库具有适合此用例的数据结构?或者,您会如何建议自己构建?谢谢!

                  What libraries in C or C++ have a data structure that fits this use case? Or, how would you recommend building your own? Thanks!

                  推荐答案

                  我建议你试试 Google SparseHash(或 C11 版本 Google SparseHash-c11),看看它是否适合您的需求.它们具有内存高效的实现以及针对速度进行优化的实现.我很久以前做过一个基准测试,就速度而言,它是最好的哈希表实现(但也有缺点).

                  I would recommend you to try Google SparseHash (or the C11 version Google SparseHash-c11) and see if it suits your needs. They have a memory efficient implementation as well as one optimized for speed. I did a benchmark a long time ago, it was the best hashtable implementation available in terms of speed (however with drawbacks).

                  这篇关于超高性能C/C++哈希图(表、字典)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Unable to access non-const member functions of objects in C++ std::set(无法访问 C++ std::set 中对象的非常量成员函数)
                  How should a size-limited stl-like container be implemented?(应该如何实现大小受限的 stl 类容器?)
                  Constructing std::function argument from lambda(从 lambda 构造 std::function 参数)
                  STL BigInt class implementation(STL BigInt 类实现)
                  Sync is unreliable using std::atomic and std::condition_variable(使用 std::atomic 和 std::condition_variable 同步不可靠)
                  Move list element to the end in STL(在 STL 中将列表元素移动到末尾)
                  <tfoot id='PA3e3'></tfoot>

                  <small id='PA3e3'></small><noframes id='PA3e3'>

                  • <i id='PA3e3'><tr id='PA3e3'><dt id='PA3e3'><q id='PA3e3'><span id='PA3e3'><b id='PA3e3'><form id='PA3e3'><ins id='PA3e3'></ins><ul id='PA3e3'></ul><sub id='PA3e3'></sub></form><legend id='PA3e3'></legend><bdo id='PA3e3'><pre id='PA3e3'><center id='PA3e3'></center></pre></bdo></b><th id='PA3e3'></th></span></q></dt></tr></i><div id='PA3e3'><tfoot id='PA3e3'></tfoot><dl id='PA3e3'><fieldset id='PA3e3'></fieldset></dl></div>
                      <legend id='PA3e3'><style id='PA3e3'><dir id='PA3e3'><q id='PA3e3'></q></dir></style></legend>
                      • <bdo id='PA3e3'></bdo><ul id='PA3e3'></ul>

                            <tbody id='PA3e3'></tbody>