🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++
Article #587

Re: Concurrent Hashmap

#587
From: Chris M. Thomasson
Date: Wed, 21 Oct 2026 19:57
18 lines
2268 bytes
On 10/21/2026 12:39 PM, Joseph Seigh wrote:
> I worked out how you would do an open addressing hashmap in c++ using
> Cliff Clicks algorithm just for fun.  Readers would be wait-free and
> writers would be completly lock-free.  All the necessary info would be
> in the array element cell rather than being linked would lose the array
> scanning performance advantage putting it on par with chained hashing
> performance wise.
> 
> Not going to implement it as there are probably a bunch of these out
> there already but it was good practice in how to implement concurrent
> semantics correctly in different ways in lock-free programming.

Oh yeah. I have read many papers on concurrent hash maps in the past. 
Too many to count now. The simple one, hash a pointer into an array. 
Link it. Collisions simply link. The readers just use RCU and iterate 
the shit out of it. The writers are all lock-free. Removing them can be 
interesting for the writers. Didn't you do an old tree thing way back in 
cpt?
Technical Details
Message-ID: <11bb5f2$8nfg$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11bb4df$7rc7$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Newsgroups: comp.lang.c++
Subject: Re: Concurrent Hashmap
Date: Wed, 21 Oct 2026 12:57:19 -0700
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <11bb5f2$8nfg$1@dont-email.me>
References: <11bb4df$7rc7$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 21 Oct 2026 19:57:22 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="286192"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/jPPYt0jPtOZh+H/+Ifkgu4tvbEpA+Wc8="; posting-host="d9474f69efa370122fa7affb666feeef"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:X2CAsHrVRssMK7cDrusuatMXeqo= sha256:lSotlX8ZOcN6M8RE4IHm5XCf0oMByDCNMrWmmlSFkn4=
	sha1:mgMsJmKMFMaNUxHftjzUcEN3ZRQ= sha256:s4cu4zSWf+iQaxudodwmsNpxeY064yw1421nWsVjG4A=
In-Reply-To: <11bb4df$7rc7$1@dont-email.me>
Content-Language: en-US