Answer efficiency questions for beginners

Source: Internet
Author: User

Answer efficiency questions for beginners

This article is from comments from readers on my blog. He was very excited when he encountered a question raised by an active thinker. For the complete dialog, see C language and programming practice reference-n =! + B! + C! Comments on the middle and second floors.
[Problem]
Instructor, I tried % ¥ #&...... % ......, But will the program become more efficient?
[Answer]
I'm glad you asked this question. There are not many students in my physical courses. This involves our multi-dimensional understanding of efficiency.
In most cases, Efficiency refers to the efficiency of the computer, which requires time efficiency (as little as possible) and space efficiency (less memory space occupied during operation ). Most of them focus on time efficiency. Therefore, the number of lines in the source code is not the key to determining the time efficiency. As long as the final target code reduces the number of operations executed by the computer, the time will naturally be faster. The efficiency of another dimension should also be realized that it is human efficiency. Computer systems are integrated by computers and people. In fact, human efficiency is more valuable. This is critical to some companies as labor costs increase. If the problem is not too complex or the computer efficiency is low, but it is enough to meet the requirements, as a developer "person", you do not have to spend too much effort on computer efficiency. The most critical part of a system, the "bottleneck" that affects the system performance, is worth a lot of manpower and a very smart head to pursue computer efficiency. This is why many junior programmers cannot understand the necessity of learning algorithms (although good junior programmers do not have the knowledge of algorithms at all ). Your solution obviously has a high computer efficiency and a low human efficiency. Even worse, algorithms are complicated, and errors are more likely. Any project follows the rule that "Simplicity is beauty.
To answer this question, I'm glad to say a few more words.
Of course, as a learner, especially a beginner, your "low labor efficiency" is the most efficient from the perspective of learning and has a great value for training and thinking. Continue this kind of thinking and questioning!

Related Article

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.