• Re: futexes vs. system semaphores

    From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.c on Sun Nov 22 21:55:22 2026
    From Newsgroup: comp.lang.c

    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)>.
    --- Synchronet 3.21e-Linux NewsLink 1.2