Type systems do more than just catch errors - they guide compiler optimizations too. This post explores type-based alias analysis in C and C++, showing how aliasing affects performance, why undefined behavior matters, and how the restrict keyword helps unlock faster code.