TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Parallel-hashmap: drop-in replacement for unordered_map, unordered_set

62 点作者 klaussilveira4 个月前

6 条评论

syspec4 个月前
From the readme:<p>Parallel-hashmap or GTL?<p>The observant among us may have noticed that I have two github repos, parallel-hashmap and gtl, which both provide very similar functionality. Indeed the hash tables in both are equivalent and the code mostly the same. The main difference is that parallel-hashmap only requires a C++11 compiler, while gtl requires a C++20 compiler.<p>My recommendation would be to use gtl if you are compiling with C++20 or higher, and parallel-hashmap otherwise. While the included hash maps are equivalent, gtl is where new development occurs, and it will include useful new classes.
throwaway815234 个月前
I think the &quot;parallel&quot; in this hashmap comes from the use of SIMD instructions for probing. I guess that&#x27;s clever and legitimate. There is a mention of thread safety in the readme, but nothing about the hashmap itself using multicore parallelism, which doesn&#x27;t make much sense anyway.
评论 #42625109 未加载
评论 #42619745 未加载
inDigiNeous4 个月前
I remember dropping parallel hashmap into my C++ app after years of using the standard library containers, and being honestly positively surprised my app got significantly faster after that.<p>So thanks for the developer of this!
egberts14 个月前
This article is also important for nftables (Linux kernel firewall) for it also has the same &#x27;set&#x27; and &#x27;map&#x27; in its rule definition.<p>Last time I reviewed the nftables code, they are experiementing with multiple algorithm selections based on size of its &#x27;set&#x27; and &#x27;map&#x27;.
Night_Thastus4 个月前
How does it compare vs unordered_dense, which was the successor to robin_hood?
remram4 个月前
[for C++]