Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #118626
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: C++20 futex with heavy contention slower than mutex |
| Date | 2024-03-29 15:30 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <uu7feo$i04u$3@dont-email.me> (permalink) |
| References | <uu6eqs$ab8u$1@raubtier-asyl.eternal-september.org> <uu7fa1$i04u$2@dont-email.me> |
On 3/29/2024 3:28 PM, Chris M. Thomasson wrote: > On 3/29/2024 6:14 AM, Bonita Montero wrote: >> The following program simulates constant locking und unlocking of one >> to jthread::hardware_concurrency() threadas with a std::mutex and a >> futex. On my 16 core / 32 thread Zen4 system a futex is faster up to >> 5 threads constantly contending, but beyond the CPU time of the futex >> explodes and the conventional mutex is faster with Windows as and with >> Linux. > [...] > > A futex is not a mutex! > I have to take a look at the logic you used for your "mutex" based on a futex, not enough time right now. Perhaps, the std::mutex is just way more efficient that your use of a futex? Keep in mind futexs are tricky: https://cis.temple.edu/~giorgio/cis307/readings/futex.pdf ;^) It depends on the logic you use.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-03-29 14:14 +0100
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-03-29 15:28 -0700
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-03-29 15:30 -0700
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-03-29 16:29 -0700
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-03-29 19:46 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-03-30 09:25 +0100
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-03-30 11:51 -0700
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-03-30 12:02 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-03-30 21:18 +0100
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-03-31 13:11 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-01 08:32 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-03-31 23:40 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-01 10:57 +0200
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-01 11:01 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-01 12:27 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-02 04:37 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-12 14:16 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-13 03:00 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-13 12:26 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-14 06:19 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-13 21:26 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-14 06:30 +0200
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-14 06:34 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-13 22:21 -0700
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-13 22:21 -0700
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-13 22:22 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-14 07:30 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-13 22:32 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-14 07:36 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-13 22:42 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-14 07:46 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-13 22:48 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-14 11:25 +0200
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-14 15:12 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-14 12:02 -0700
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-14 12:06 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-14 22:57 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-14 20:23 -0700
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-14 20:26 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-15 06:15 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-14 22:03 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-15 08:20 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-15 12:08 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-16 06:32 +0200
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-16 11:31 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-16 14:07 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-17 10:24 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-17 11:48 -0700
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-17 11:52 -0700
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-16 14:14 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-18 15:12 +0200
Re: C++20 futex with heavy contention slower than mutex Richard Damon <richard@damon-family.org> - 2024-04-18 22:03 -0400
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-19 06:18 +0200
Re: C++20 futex with heavy contention slower than mutex scott@slp53.sl.home (Scott Lurndal) - 2024-04-19 13:41 +0000
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-19 15:44 +0200
Re: C++20 futex with heavy contention slower than mutex scott@slp53.sl.home (Scott Lurndal) - 2024-04-19 14:48 +0000
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-19 17:32 +0200
Re: C++20 futex with heavy contention slower than mutex scott@slp53.sl.home (Scott Lurndal) - 2024-04-19 18:27 +0000
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-20 04:48 +0200
Re: C++20 futex with heavy contention slower than mutex scott@slp53.sl.home (Scott Lurndal) - 2024-04-20 15:16 +0000
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-20 17:36 +0200
Re: C++20 futex with heavy contention slower than mutex Richard Damon <richard@damon-family.org> - 2024-04-19 23:00 -0400
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-04-20 06:11 +0200
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-14 12:10 -0700
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-13 22:46 -0700
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-03-31 22:01 -0700
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-03-31 22:02 -0700
Re: C++20 futex with heavy contention slower than mutex Bonita Montero <Bonita.Montero@gmail.com> - 2024-03-30 05:18 +0100
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-03-30 12:00 -0700
Re: C++20 futex with heavy contention slower than mutex Michael S <already5chosen@yahoo.com> - 2024-04-01 12:18 +0300
Re: C++20 futex with heavy contention slower than mutex "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-04 19:56 -0700
csiph-web