Error!
Success!

Do modern compilers optimize the x * 2 operation to x << 1?

0
kicks

Do modern compilers optimize the x * 2 operation to x &lt;&lt; 1?  (Unpublished)

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.


Kicked By:
Drop Kicked By: