Optimizing CPU code is a lot of fun. Here’s how we do it