Should we still be optimizing “in the small”?

后端 未结 22 2133
旧时难觅i
旧时难觅i 2020-12-05 11:32

I was changing my for loop to increment using ++i instead of i++ and got to thinking, is this really necessary anymore? Surely today\'s compilers

22条回答
  •  时光说笑
    2020-12-05 11:45

    The compiler is in a better position to judge and make such decisions. Micro optimizations you make may come into its way and ultimately miss the whole point.

提交回复
热议问题