++ I and -- I who have high efficiency?

Source: Internet
Author: User

++ I and -- I who have high efficiency?


When I see the blogs of experts, there is a question about the efficiency of ++ I and I for the loop (a little geek, but I like it ~)


Http://blog.csdn.net/dog250/article/details/5303375


 
# Include <stdio. h> int main (void) {int I = 0; for (I = 0; I <10; I ++) {printf ("Hello world! \ N ") ;}return 0 ;}

The main parts of disassembly are as follows:




# Include <stdio. h> int main (void) {int I = 0; for (I = 10; I> 0; -- I) {printf ("Hello world! \ N ") ;}return 0 ;}


Result of disassembly:



The efficiency of writing to I in the blog record of Wang Ran's predecessors is higher than that of I ++, but I feel no difference here...

Thank you for your advice.






++ I and -- I who have high efficiency?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.