Sujet : Re: Futexes ain't fast
De : chris.m.thomasson.1 (at) *nospam* gmail.com (Chris M. Thomasson)
Groupes : comp.lang.c++Date : 30. Aug 2024, 23:20:42
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vatgjq$lgvc$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Mozilla Thunderbird
On 8/29/2024 12:44 PM, Bonita Montero wrote:
Am 29.08.2024 um 21:20 schrieb Chris M. Thomasson:
Actually, release can be SetEvent because the mutex logic only needs a binary semaphore, or an event on windows. However, I cannot remember if an event is "faster" than a semaphore on windows or not. Still do not know how windows handles it's futexes wrt internal impl. WaitOnAddress and such.
A semaphore is not signifiantly but measurable faster.
See, this would be measuring the "slow" path. If you algo tends to hit a slow path most of the time, then perhaps is not being used correctly, or its a sign to take heed, indeed.