I really liked this post. It’s not an “OMG super powerhouse dev amazingness” it’s just a guy figuring out how to improve some code and sharing it. That’s my jam.
[Comment removed by author]
Reminds me of this: https://www.kernel.org/doc/ols/2006/ols2006v1-pages-441-450.pdf
Next week: other amazing tricks such as removing sleeps from inner loops!
Sleeps can help in inner loops if the loop is targeting a highly contended mutex. Which of course is something that should be measured.