Principles of Computer: What is the "property"?

Principles of Computer: What is the "property"?

The author is a beginner, this article is the author of the study concluded, is not necessarily accurate.

Performance is a very common word. After completing the simple terms of computer geeks time composition principle after a little comb their understanding of performance.

"Performance" = countdown time

Turning to performance, we generally divided into two indicators to measure. They are the response time and throughput .

Response time

Also known as execution time. It refers to a certain period of time the CPU has completed the required procedures. Like a completion time of factory parts needed for production.

Throughput

Also known as bandwidth. It refers to the number of CPU completed within a period of time, like every hour is a measure of factory production completion rate of the number of parts completed or is a part of the number.

Response time like a sprint results, such as throughput and specified how much time can run. For the CPU, the increase in throughput can improve sprint performance on the efforts that reduce the response time, or more than the number of brush called a few friends together micro-walking , that heap of hardware.

CPU would improve the response time is very difficult, but the hardware is relatively simple heap. As if to find a friend to help brush a few steps than the mad sprint training and more relaxed is a reason.

We then how will the performance index of it? We generally this definition:
\ [Performance = \ frac {1} {} Response Time \]
Clearly, the shorter the response time, the higher the performance.

In recent days, the phone processor to run sub is very common. Specify the rule to run sub-agency called the SPEC (Standard Performance Evaluation Corporation) .Anyway, I think it is more and more outrageous ......

Timing unit of the computer: CPU clock

Although with time to measure the performance of the CPU is a very natural thing. But statistically CPU time the way we are traditional pinch timing table , reflected in the data is not accurate . The reason is, CPU at run time, not concentrate , but half-hearted in.

In fact, when we tested, CPU is not just only in running our tests , it also secretly running another program. Let's say things like service system, CPU actually been in constant switching directly pinch table data obtained is not accurate, we need to remove all the other time-independent, the rest of the time we can consider running time of the program.

In fact, this is not enough. When the CPU is running, for cooling things like ah, it would sneak down frequency point about her. You still can not guarantee the accuracy of your data. Likely the last test of time, CPU is run at full capacity, but the next test, on the reduced frequency .

There is, the computer is not only composed of a CPU, the result is likely to also be affected by the motherboard memory ah ah like, in short, relying solely on the time data is not a good measure of performance.

Do not do that, not accurate enough. So we separated further time to analyze:
\ [program execution time of the CPU = number of CPU clock cycles clock cycle time * \]

Clock cycle time

Bought the computer should be a little effect on the CPU clock speed. For example, my laptop CPU:

Inter(R) Core(TM) i5-8300H CPU @ 2.30GHz 2.30GHz

As mentioned frequency, we could not help but think of the formula:
\ [F = \ FRAC. 1 {} {} T \]
as we thought to simply handle bar 2.3G simple instructions within one second of CPU it!

CPU has an internal thing like quartz, called crystal . We may think it is a thing inside the CPU time flow rate. When it is a dynamic, internal instructions to complete a one. In other words, it is moving faster, CPU instructions to complete sooner.

The so-called overclocking , is to use some means to improve the flow rate of the internal CPU time, making the CPU to work faster.

Almost mean. Note that the flow of time is only a slight exaggeration, not really speed up the time, this is to accelerate the physical level, such as when the deadline is approaching madness liver liver work items as you accelerate the time is not too much of it ha ha ha ha.

CPU overclocking always so easily lead to downtime,As if the project was sent to ICU stay up late liver a reason.

The number of CPU clock cycles

A clock cycle and can continue into the classification, which can be expressed as:
\ [the CPU clock cycles = number of instructions the average number of clock cycles per instruction * \]
clock cycle are not the same for each instruction, add instruction faster than the multiply instruction, add instruction clock cycle means that is smaller than the clock cycle multiply instruction.

That is the completion of each instruction may require multiple clock cycles , required between the instruction clock cycle may vary .

Gather

According to the above resolution, we can original formula:
\ [program execution time of the CPU clock cycles * = number of CPU clock cycle time \]
successfully resolved in this way:
\ [CPU execution time of the program the number of instructions = * CPI * CCT \]

\ [Average number of clock cycles per instruction CPI (Cycles \ space Per \ space Instruction) = \]

\ [CCT (Clock \ space Cycle \ space Time) = clock cycle time \]

Ever since, we want to complete optimization of the performance of these three aspects can be optimized;

  1. Reduce CCT . Hit the money to buy hardware now!
  2. Reduce the number of instructions.
  3. Lower CPI

We thought of as a CPU programmer. Programmer's typing speed is equivalent to CCT. The lower the CCT, typing faster, more quickly knock code. CPI is equivalent to programmers how many shortcut keys, shortcut keys will be more, the lower the number of keystrokes required to play one line of code and hit sooner. While programmers design ideas equivalent to the number of instructions, when he was a reasonable idea to arrange the structure and algorithm code, can greatly avoid code redundancy, with a few lines of code to complete the function that would otherwise require hundreds of lines of the same the faster development. If you can meet all three at the same time, the performance of the program can be greatly improved.

Reflection: run sub on the phone how to "cheat"?

There is a very simple way (in conjunction with the above conclusion). Because for heat dissipation and power consumption for mobile phones and prolonged use temperature, take down operation. I just detected software to run sub opened, I disabled radiating control, disable power management, kill all non-essential background programs, direct pull over even overclocking frequency, and the number of instructions optimized for running sub-program , not you can run out and the actual experience does not match scores a thing?

Guess you like

Origin www.cnblogs.com/cell-coder/p/12376853.html