Quantcast
Channel: Win32 Critical Section vs Mutex Performance - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Cory Nelson for Win32 Critical Section vs Mutex Performance

Critical sections are a hybrid of user-mode and kernel-mode. They try to keep your thread from context switching by using a spin lock (user-mode) before falling back on a more expensive semaphore...

View Article


Answer by japreiss for Win32 Critical Section vs Mutex Performance

I think there are two factors:Mainly - Your program is dominated by thread creation overhead. You are creating and destroying 2000 threads, and only accessing the mutex/CS once per thread. The time...

View Article

Win32 Critical Section vs Mutex Performance

I wrote a small program to compare the performance of Critical Section vs Mutex in Windows. On the tests I ran, acquiring Critical Section seems to be Slower :O Can anybody explain why both things take...

View Article
Browsing all 3 articles
Browse latest View live