🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1795

Re: futexes vs. system semaphores

#1795
From: Lawrence D’Oliveiro
Date: Sun, 22 Nov 2026 21:55
9 lines
1596 bytes
On Sun, 22 Nov 2026 12:09:30 +0100, Bonita Montero wrote:

> I developed a little Win32 / Posix C++20-application that benchmarks
> futexes vs. system semaphores. I expected a significant advantage of
> futexes, but not that: With Win32 futexes are 11.6 times faster than
> semaphores, with WSL2 they're 10 times faster.

Which is probably why the Linux kernel offers futexes as a low-level
synchronization primitive <https://manpages.debian.org/futex(7)>.
Technical Details
Message-ID: <11dvoca$1bds1$3@dont-email.me>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11duih8$sm6c$1@raubtier-asyl.eternal-september.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Lawrence D’Oliveiro <ldo@nz.invalid>
Newsgroups: comp.lang.c
Subject: Re: futexes vs. system semaphores
Date: Sun, 22 Nov 2026 21:55:22 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <11dvoca$1bds1$3@dont-email.me>
References: <11duih8$sm6c$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 22 Nov 2026 21:55:23 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1423233"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18wk++6FBxuDA2jTPi3ziRG"; posting-host="459210f3b638d87187d8a6c5f3a5794f"
User-Agent: Pan/0.165 (Kostiantynivka)
Cancel-Lock: sha1:VWt0arF5f2Fqv+S9onKysTj9Sqk= sha256:xTqI+LvXXnu+rGzUr0LJieO6IFhclt/kgijCaezqvQM=
	sha1:1Bc2WxME1exPZrDl3ZfsxNvUApg= sha256:bQJQyDKSQjQzgoJrAU+TZcEsFdY4YcXINbaUCVdozHM=