How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Optimizing a Spin-Lock -- David Álvarez Rosa

calendar_today September 22, 2026 person dalvrosa domain cplusplus

From a naive exchange loop to a spin-lock 5.7x faster drawing 5.4x less energy, with benchmarks, assembly, and perf counters at each step. Optimizing a Spin-Lock by David Álvarez Rosa From the article: A spin-lock is a lock that never sleeps. Instead of yielding to the scheduler, the thread stays on the CPU and spins .

open_in_new Read original post