Skip to content

Benchmarks

Dmitrii Shmanatov edited this page Jun 6, 2026 · 2 revisions

Semaphore Benchmark Results

Comparison between local PHP Atomic semaphore and distributed Go + Redis/Lua semaphore.

Metric PHP Atomic (local) Go Distributed (Redis+Lua)
Total time (1000 iterations) 0.51 ms 382.96 ms
Average per operation 0.51 µs 382.96 µs
Performance ratio 1x 757x slower

Key Takeaway

  • PHP Atomic is ultra-fast (nanoseconds) but works only on a single node.
  • Go Distributed is slower due to network calls, but enables synchronization across multiple servers.

Choose based on your architecture: local semaphore for a single pod, distributed for a cluster.

Benchmark Environment

neofetch

Clone this wiki locally