久久久久久久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)換單一顏色)
主站蜘蛛池模板: 成人深夜福利 | 欧美一区二区三区日韩 | 亚洲成人福利视频 | 国产高清在线 | 日韩字幕| 野狼在线社区2017入口 | 国产一二三区免费视频 | 99一区二区| 欧美日韩国产在线观看 | 中文字幕在线观看日韩 | 国产一级在线 | 国产精品欧美大片 | 欧美激情精品久久久久久变态 | 日韩精品四区 | 久久久久久高清 | 色影视| 欧洲成人午夜免费大片 | 国精产品一品二品国精在线观看 | 人碰人操 | 成人欧美 | 成人欧美一区二区三区在线播放 | 天天拍天天操 | 日韩欧美国产一区二区 | 日韩中文字幕在线视频 | 国产精品视频一区二区三区四蜜臂 | 亚洲精品久久久 | 中文字幕av网站 | 国产一区不卡 | 黄色a级一级片 | 国产精品久久久久久久久免费软件 | 久久新| 国产91一区二区三区 | 91国内外精品自在线播放 | 亚洲精品一区二区三区蜜桃久 | 天堂亚洲 | 成人精品| av在线免费看网址 | 一级做受毛片免费大片 | 精品国产一区二区国模嫣然 | 国产美女视频一区 | 国产福利在线 |