久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

超高性能C/C++哈希映射(表、字典)

Super high performance C/C++ hash map (table, dictionary)(超高性能C/C++哈希映射(表、字典))
本文介紹了超高性能C/C++哈希映射(表、字典)的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我需要將原始鍵(int,可能是 long)映射到高性能哈希映射數(shù)據(jù)結(jié)構(gòu)中的結(jié)構(gòu)值.

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

我的程序會(huì)有幾百張這樣的地圖,而每張地圖一般最多只有幾千個(gè)條目.但是,地圖會(huì)不斷刷新"或攪動(dòng)";想象一下,每秒處理數(shù)百萬條 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++ 中的哪些庫具有適合此用例的數(shù)據(jù)結(jié)構(gòu)?或者,您會(huì)如何推薦自己構(gòu)建?謝謝!

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)并查看它是否適合您的需求.它們具有內(nèi)存高效的實(shí)現(xiàn)方式以及針對(duì)速度進(jìn)行了優(yōu)化的實(shí)現(xiàn)方式.我很久以前做過一個(gè)基準(zhǔn)測試,它是速度方面最好的哈希表實(shí)現(xiàn)(但也有缺點(diǎn)).

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).

這篇關(guān)于超高性能C/C++哈希映射(表、字典)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Assertion failed (size.widthgt;0 amp;amp; size.heightgt;0)(斷言失敗(size.width0 amp;amp; size.height0))
Rotate an image in C++ without using OpenCV functions(在 C++ 中旋轉(zhuǎn)圖像而不使用 OpenCV 函數(shù))
OpenCV: process every frame(OpenCV:處理每一幀)
Why can#39;t I open avi video in openCV?(為什么我不能在 openCV 中打開 avi 視頻?)
OpenCV unable to set up SVM Parameters(OpenCV 無法設(shè)置 SVM 參數(shù))
Convert a single color with cvtColor(使用 cvtColor 轉(zhuǎn)換單一顏色)
主站蜘蛛池模板: 成人精品鲁一区一区二区 | 国产高清视频一区 | 午夜视频在线 | 一级毛片视频 | 综合激情网 | av中文在线观看 | 欧洲尺码日本国产精品 | 欧美国产激情二区三区 | 国产一区二区在线免费观看 | 精品久久久久久久久久久久久久久久久 | 色视频一区二区 | 久草在线青青草 | 国产精品日日做人人爱 | 香蕉婷婷 | 久久精品 | 亚洲成人中文字幕 | 国产精品美女久久久久久久网站 | 亚洲狠狠| 黑人巨大精品欧美黑白配亚洲 | 久久人爽 | 欧美激情久久久 | 久久精品久久久久久 | 欧美激情 一区 | 国产一区二区在线免费观看 | 婷婷久 | 国产精品三级久久久久久电影 | 激情六月丁香 | 午夜免费小视频 | 国产午夜精品久久久久 | 日日夜夜精品 | 国产农村妇女毛片精品久久麻豆 | 毛片.com| 韩日在线视频 | 91操操操 | 殴美黄色录像 | 中文久久 | 午夜电影一区二区 | 亚洲第一区久久 | 国产欧美日韩一区 | 亚洲午夜精品视频 | 国产a一区二区 |