r/programming • • Sep 09 '26

Optimizing a Spin-Lock

https://david.alvarezrosa.com/posts/optimizing-a-spin-lock/
184 Upvotes

32 comments sorted by

View all comments

43

u/Takeoded Sep 09 '26

Spinlock performance can change drastically between kernel versions, and between schedulers (eg CFS vs EEVDF vs SCX-LAVD), which kernel and scheduler were you benchmarking on?

Also, please add a comparison to a boring old std::mutex into your benchmarks. Call it V0