I tested the operating-system specific mutex (CRITICAL_SECTION Or pthread_mutext_t) against a futex and a std::mutex. I guessed std::mutex
uses th operating system specific mutex internally, but the times varied
so much across Windows and Linux that I gues that std::mutex used at
least a differently parametrized operating system mutex or maybe even completely own code.
This are the times and each line has a further contender:
On 8/30/2024 6:31 AM, jseigh wrote:...
They don't have to be fast, they just have to allow correct
synchronization
and allow performant fast paths. Can the api be improved for the latter? >> Certainly yes. It is an awkward api to use.
100% agreed. Eventcounts are in the mix as well.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 55:16:59 |
Calls: | 10,397 |
Calls today: | 5 |
Files: | 14,067 |
Messages: | 6,417,425 |
Posted today: | 1 |