Program Optimization Talk - Preface
(Author: mikespook | Date: 2003-4-13 | Views: 95)
Keywords: Program, optimization About program optimization, is a long-lasting topic from the computer. Early computer due to slow operation, small storage capacity, programmers had to research algorithms over and over again, and optimize procedures. But with the development of computer hardware, we can now write procedures, regardless of these code is too slow, or is not too big. Moreover, with the continuous advancement of compilation technology, it also reduces the workload of programmers in program optimization. Rumor, when a compiler is compiled, some cases can reach the transformation of the high-level language to the machine instruction in some cases. This is really struggling to struggle in the code ocean, no need to consider optimization, and pay all optimized work to the compiler. But is it true? Technical progress really can be optimized instead of artificial operation? I often heard the "master" very proud to take my own slow and big procedures to "rookie": "Look, my program's Framework is more." Every time I heard this, I want to say about these code. : "SH * T!" (I didn't dare to say to the master, after all, the skill is not as good. ^ @ ^) I am a old rookie, I don't know what Framework, but this slow and big program is definitely not what I want. of. So I decided to sort out so things from my sculpture small skills. I hope that these inferior skills can have a little help you, not to waste your time. I still think about what other things, the speed is fast, and the code with less space is one of the basic qualities that each excellent programmer should have. I may not be scheduled to make some sorting to everyone. But the name of these articles made me hard. Program optimization is not only on code level, and there is an overall structure design and compiler technology. So these articles may be called code optimization more appropriate. But maybe in the future, when you have improved it (at least what is Framework ^ $ ^), it will join the discussion about the higher level. Because it is a spurs, I want to give some suggestions for friends who are suitable for reading this article. (Temporarily only for code optimization) Not suitable for reading these articles: In order not to let you watch nonsense waste time, look at this. 1. Friends who have just started to contact programming to a large number of tips, if you start to learn to program, I still suggest you to make the foundation first. Let's experience these "weird" techniques. 2. To do system analysis, friends with architecture design are limited by the level, so the optimization I said here is conducted at the code level. For systematic analysis, architectural design is useless. Don't waste your time on these. 3. Believe optimization is unnecessary, or think that optimization should be confident that the compiler is completed to believe me, this is definitely not what you want to see. I won't discuss the need for optimization and will not introduce any content optimized by compiler characteristics. In addition to messing you with your beautiful code, there will be no more help. You'd better look at the compiler manual. I hope that the following friends can take a look at these articles: 1. All feelings can't stand the unparalleled code, and I don't know what to let it run faster, you should be able to try to modify your own by reading these articles. Code allows them to run at a speed you can accept. 2. Friends who have experience in code level optimization I don't think you will gain something from these inferior skills. I just hope that you can read them and point out the mistakes and shortcomings, let me have a bigger progress. I think that is your own thing about how to read these articles. But I still talk about my opinion, for reference only. 1. I am not a way, but an idea, a kind of thinking (get, I am not so big, so I don't want to claim thinking. But I should have no one has opinion?). If you can gain something from it, you should also experience these ideas. learn by analogy. Apply to your program.