It depends on the implementation, but you will probably find that the mutex is implemented a little faster. Mutexes are usually implemented using a test and a set, while semaphores are often implemented using a test and an increment, or as a mutex protecting a variable that increases.
I would suggest using a mutex in most cases, but not because of speed; simply because code written using mutexes is easier to understand because semantics are less complex.
source
share