The document discusses three optimization tips for C++ code: reduce strength by using fewer operations like division and instead using comparisons and additions; minimize writes to arrays which can disable optimizations; and reformulate algorithms to make an extra pass to compute values instead of writing to arrays. It provides examples of digit counting functions optimized using these tips by reducing divisions, writing to arrays backwards, and making an extra pass to find the length.