Compiler optimization causing program to run slower

后端 未结 3 1568
孤街浪徒
孤街浪徒 2020-12-11 04:00

I have the following piece of code that I wrote in C. Its fairly simple as it just right bit-shifts x for every loop of for.

int main() {
   int         


        
3条回答
  •  独厮守ぢ
    2020-12-11 04:15

    Additional information about why integer overflows are undefined can be found here:

    http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html

    Search for the paragraph "Signed integer overflow".

提交回复
热议问题