A brief overview of CPU performance indicators

As the computing core and control core of a computer, the CPU (Central Processing Unit) is composed of an arithmetic unit, a controller, a register, and a bus that realizes the data, control, and status of the connection between them, and determines the strength of the computer's computing performance. As the core basic component of the information technology industry, the operation of the CPU can be divided into four stages: fetch (Fetch), decode (Decode), execute (Execute) and write back (Writeback).

Summarize the operating principle of the CPU in one sentence: the CPU fetches instructions from the memory or cache memory, puts the instructions into the registers, decodes the instructions, and executes the instructions.

In the embedded system industry, the standards used to evaluate CPU performance indicators mainly include:

  • MIPS (Million Instructions Per Second) : It is the number of million-level machine language instructions that can be executed per second, used to calculate the second-level processing power of the system, and is an indicator to measure the speed of the CPU.

  • DMIPS (Dhrystone MIPS) : refers to the relative performance of the CPU when running integer operations (Dhrystone), and is only applicable to evaluating scalar machines (corresponding to: vector machines).

  • FLOPS (Floating-point Operations Per Second) : Indicates the number of floating-point operations performed by the CPU per second, and is mainly used to measure the floating-point computing capability of the computer.

  • CoreMark: The number of iterations per second is used as the performance evaluation.

MIPS standard

In the 1970s, the performance of minicomputers was evaluated in comparison to the VAX MIPS, referring to the runtime of running the same job as compared to the VAX 11/780 (a market-recognized 1 MIPS machine).

▲ The 46-year-old VAX 11/780

MIPS cannot be compared under different processor architectures. Since not every mechanical instruction can be calculated in a single cycle, a CPI (Clock cycle per instruction, the average number of clock cycles per instruction) value will be introduced when calculating MIPS. The formula is as follows:

  • MIPS=number of instructions/(execution time*1000000)

  • MIPS=main frequency/(CPI*1000000)

DMIPS standard

In a certain sense, DMIPS also uses the VAX 11/780 processor as its nominal value.

Here we must first introduce one of the most representative general-purpose running score processors, Dhrystone. Dhrystone is a benchmark test program proposed by Reinhold P. Weicker in 1984. Its main purpose is to test the performance of processor integer operations and logic operations. Since the VAX 11/780 processor can cycle the Dhrystone program 1757 times per second, the number of cycles that other processors execute the Dhrystone program per second divided by 1757 is its DMIPS value.

On this basis, removing possible influencing factors such as process and power consumption, and dividing the DMIPS value of the processor by its frequency, the DMIPS/MHz that can more intuitively reflect the performance of the processor microarchitecture design itself can be obtained.

The difference between MIPS and DMIPS:

  • The ability reflected by MIPS - the number of instruction sets that can be executed per second, this ability is determined by hardware characteristics such as CPU architecture and memory access speed;

  • The capacity reflected by DMIPS - the number of jobs that can be achieved per second.

*According to the literal meaning, there seems to be a conversion formula between MIPS and DMIPS, but after verification, the two evaluate CPU performance from different angles, and there is no direct conversion relationship.

*The origin of the name "Dhrystone" is "Wetstone", another tool for testing CPU floating-point computing performance that appeared relatively earlier. "Wetstone" originally means "wet stone", and Dhrystone is a dry stone, which is used to test the integer computing performance of the CPU.

FLOPS standard

FLOPS is often used to estimate the execution performance of computers, especially in the field of scientific computing that uses a large number of floating-point operations. "Floating point operations" will take more time than integer operations because they cover all operations involving decimals. Most of the current processors are equipped with a "Float Point Unit" (Float Point Unit, FPU) dedicated to processing floating-point operations, so what the FLOPS standard measures is actually the FPU execution speed.

CoreMark standard

CoreMark can be understood as a comprehensive processor running score program similar to Dhrystone. It was proposed by Shay Gla-On of the non-profit organization Embedded Microprocessor Benchmark Association EEMBC in 2009. Its main goal is to test the core performance of the processor.

*EEMBC:Embedded Micro-processor Benchmark Consortium

The CoreMark program is written in C language and includes the following algorithms: enumeration (finding and sorting), mathematical matrix operation (common matrix operation), state machine (used to determine whether the input stream contains valid numbers) and CRC (Cyclic Redundancy Check, cyclic redundancy check). CoreMark has specific running and reporting rules, which can avoid difficult comparison of test results due to different compiled libraries used. Therefore, the CoreMark standard is considered to be more practical than the Dhrystone standard.

The CoreMark standard uses the number of times the CoreMark program runs per unit of time under a certain configuration parameter combination as the measurement standard, and the index unit is CoreMark/MHz. A higher CoreMark number means higher performance.

▲ ARM processor official performance comparison: Cortex-M part series

references

[1] Gu Mengjie. Design of general microcontroller based on RISC-V instruction set architecture [D]. Donghua University, 2022. DOI: 10.27012/d.cnki.gdhuu.2022.000609.

[2] Look at the differences between ARM Cortex-M processors from the perspective of performance indicators, https://mp.weixin.qq.com/s/o1amLyzc8ZO8l59N5F2vyw

[3] Description of performance evaluation unit, https://zhuanlan.zhihu.com/p/571545878

[4] Popular science summary: Flops, FLOPS, GFLOPS, https://imgtec.eetrend.com/blog/2020/100048896.html

[5]Classic Benchmarks,http://www.roylongbottom.org.uk/classic.htm

Guess you like

Origin blog.csdn.net/digi2020/article/details/131704648