Semaphores (Zig std lib or Posix)

I’m having a play around with some multi threading, I notice that std.Thread.Semaphore implements a Semaphore using a Mutex and a Conditional. Would it instead be more performant to call posix sem_wait and sem_post from Zig?

For reference this is to sync read and write to shared memory multiple millions of times per second. Or at least, that’s what I’m aiming for.

If your only criteria is performance you need to create a benchmark with the expected usage and measure each solution.