A survey about state of the art C compiler optimization tricks, Felix von Leitner, Linux Kongress 2009.

The introduction and the conclusion is quite well put:

Optimizing == important.

But often: Readable code == more important

Learn what your compiler does Then let the compiler do it.

If you do an optimization, test it on real world data.

If itâ€™s not drastically faster but makes the code less readable: undo it.

That's certainly something that I agree with 110%. And really, that's why a good compilers course is so important, even if the vast majority of students never write a compiler outside of class.