The Linux kernel build famously avoids -O3 in favor of -O2 precisely because of the code-bloat-versus-speed tradeoff this task explores, and Compiler Explorer (godbolt.org) exists as a dedicated tool purely because engineers need to see this -O0 vs -O2 assembly diff constantly. Debugging teams routinely rebuild with -O0 specifically to get GDB and Valgrind's line-level accuracy back after a bug only reproduces at -O2, which is exactly the debugging-versus-performance tension covered here.