0
kicks
Do modern compilers optimize the x * 2 operation to x << 1?
I was wondering wether the C++ compiler inside Visual Studio 2008 was optimizing it the way it would logically be. So I asked the question on Stackoverflow. It was among my first questions and was to see how the community would answer (yeah I'm lazy).
I was promptly answered by Rob Walker. He showed me what the compiler outputted.