The question of efficiency for beginners

Source: Internet
Author: User

This article comes from readers ' comments on my blog post. It is quite exciting to meet active thinkers and put forward the question of active thinking.
For a complete dialogue, see "C Language and Procedure design practice reference--n=a!+b!+c!" in the second floor review.
  
Problem
Teacher, I try to%¥#&......% ..., but the program becomes more, so will it improve efficiency?
Reply
I'm glad you can ask such a question, this kind of active thinking, in my physical class students really not much. This involves our multidimensional understanding of efficiency.
In most cases, efficiency refers to the efficiency of the computer, with time efficiency (as little as possible) and space efficiency (less memory footprint in operation). And the focus on time efficiency is the majority. As a result, the number of lines of source code is not the key to determining the efficiency of the time, as long as the final target code, so that the computer to perform fewer operations, the time angle is naturally fast. And another dimension of efficiency, we also have to realize that that is human efficiency. Computer systems are synthesized by computers and people, in fact, people's efficiency is more valuable, which in the current situation of the increase in human costs, some companies are very critical. For a problem that is not too complex, or if the computer is inefficient but sufficient to meet the needs, the "person" as a developer does not have to spend too much effort on the efficiency of the computer. One of the most critical aspects of a system, affecting the system performance of the "bottleneck" part, it is worth to spend a lot of manpower, as well as very Smart's head, to pursue the efficiency of the computer. This is why a lot of beginners are not aware of the need to learn the algorithm (although good novice programmers, algorithm literacy is not engraved in effect). Your solution, obviously the efficiency of the computer is high, people's efficiency is low. What's more, the algorithm is complicated and the likelihood of error is even greater. Any project that follows the law of "simplicity is beauty".
To answer such questions, be happy, say a few more words.
Of course, as learners, especially beginners, your "human inefficiency", just from the learning angle is the most efficient, the value of training thinking is quite large. Keep this thinking and questioning going!

The question of efficiency for beginners

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.