Do modern compilers optimize the x * 2 operation to x << 1?(blog.decayingcode.com)
submitted by
arch4ngel(585) 3 years, 3 months ago
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.
|category: C++
|Views: 8
tags:
C++ Optimization Compiler another
Everyones tags:
Your Tags: