Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Optimizing a Spin-Lock (alvarezrosa.com)
10 points by dalvrosa 7 days ago | hide | past | favorite | 3 comments
 help



A spin-lock is a lock that never sleeps. Instead of yielding to the scheduler, the thread stays on the CPU and spins. No syscalls. No context switches. In this post, we’ll build a version, step by step, that is 5.7x faster while drawing 5.4x less energy.

Nice article

Thanks!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: