Debugging

“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you’re as clever as you can be when you write it, how will you ever debug it?” – Brian Kernighan.

That applies, even more so, to debugging an optimizer. The optimizer is smart enough now that half the “bugs” I’ve found recently weren’t bugs at all – the optimizer code was just smarter than I expected.