CPU性能衡量參數-主頻,MIPS,CPI,時鐘周期,機器周期,指令周期
1,主頻
主頻 = 時鐘頻率,它是指CPU内部晶振的頻率,常用機關為MHz,它反映了CPU的基本工作節拍;
時鐘頻率又稱主頻,它是指CPU内部晶振的頻率,常用機關為MHz,它反映了CPU的基本工作節拍;
2,時鐘周期
時鐘周期 t =1/ f; 主頻的倒數
3,機器周期
機器周期 = m*t ;一個機器周期包含若幹個時鐘周期
4,指令周期
指令周期 = m*t*n; 執行一條指令所需要的時間,一般包含若幹個機器周期
5,CPI
CPI = m*n; 平均每條指令的平均時鐘周期個數
指令周期 = CPI×機器周期 = n(CPI=n)×m×時鐘周期=nm/主頻f, 注意指令周期機關是s或者ns,CPI無量綱
參考:https://en.wikipedia.org/wiki/Cycles_per_instruction
6,MIPS(MillionInstructions Per Second)
MIPS = 每秒執行百萬條指令數 = 1/(CPI×時鐘周期)= 主頻/CPI
MFLOPS 每秒百萬浮點運算次數。
表示秒鐘所能執行的指令條數,對于微型計算機可用CPU的主頻和每條指令的執行所需的時鐘周期來衡量。
包含關系:指令周期通常用若幹個機器周期來表示,在機器語言中,使用執行一條指令所需要的機器周期數來說明指令執行的速度。而機器周期又包含若幹個時鐘周期。時鐘周期是最基本的操作機關。
參考: https://en.wikipedia.org/wiki/Instructions_per_second
注意:計算機的運算速度一般用每秒鐘所能執行的指令條數來表示。由于不同類型的指令所需時間長度不同,因而運算速度的計算方法也不同。例如,根據不同類型的指令出現的頻度,乘上不同的系數求得統計平均值,得到平均運算速度。這種方法用MIPS(Millions of Instruction Per Second)作機關,即每秒百萬條指令。
又如,直接給出CPU的主頻和每條指令的執行所需的時鐘周期。周期一般以MHz為機關。主頻即計算機的時鐘頻率,它在很大程度上決定了主機的工作速度。例如,型号為486DX-133的微型計算機,表明它的CPU型号為486,DX為含浮點處理器,數字133的含義是主頻為133MHz。
題: 若某處理器的時鐘頻率為500MHz,每4個時鐘周期組成一個機器周期,執行一條指令需要3個機器周期,則該處理器的一個機器周期▁8▁ns,平均執行速度為▁42▁MIPS
解析如下:
時鐘周期T等于主頻的倒數,即T=1/500MHz=1/(0.5×10的9次方Hz)=2 ns,機器周期等于4個時鐘周期即=4T=4×2 ns=8 ns,每條指令的時鐘周期數CPI=3×4=12,則平均速度為:f/(CPI×10的6次方)=(500×10的6次方)/(12×10的6次 方)=500/12=41.6≈42MIPS.計算主頻的倒數時要注意把主頻的MHz換算成Hz即500後面加6個0=500×10的6次方=0.5×10的9次方,1/10的9次方 Hz=1ns
每條指令的時鐘周期數CPI=3×4=12,執行一條指令需要3個機器周期數,一個機器周期包含4個時鐘周期,是以CPI=3×4=12,這裡計算 的都是周期的個數,和具體的時間ns納秒沒有關系,若帶上具體的時間,一個時鐘周期T=2ns,一個機器周期就是2×4=8ns,執行一條指令需要三個機 器周期得出執行一條指令需要的具體時間為3×8=24ns,執行每條指令的需要的時鐘周期數CPI換句話說就是把執行每條指令需要的時間24ns換算成時 鐘周期個數表示,為多少個時鐘周期個數?時鐘周期是最基本的時間操作機關,500MHz主頻的處理器一個時鐘周期為2ns,24ns等于多少個時鐘周期?24/2=12個時鐘周期,即那一句:“每條指令的時鐘周期數CPI=12”。
另一個例子:
A 40-MHzprocessor was used to execute a benchmarkprogram with the following instruction mix and clockcycle count:
Instruction type | Instruction count | Clock cycle count |
Integer arithmetic | 45000 | 1 |
Data transfer | 32000 | 2 |
Floating point | 15000 | 2 |
Control transfer | 8000 | 2 |
Determine the effective CPI, MIPS rate, and execution time for thisprogram.
Total instructioncount = 100000.
CPI = (45000*1 +32000*2 + 15000*2 + 8000*2)/100000 = 155000/100000 = 1.55.
MIPS = clockfrequency/(CPI*1000000) = (40*1000000)/(1.55*1000000) = 25.8.
Therefore:
Execution time (T)= CPI*Instruction count*clock time = CPI*Instruction count/frequency =1.55*100000/40000000 = 1.55/400 = 3.87 ms.
IPS演進時間表
處理器 | IPS | IPS/MHz | 年份 | 來源 |
筆算(用于比較) | 0.0119 IPS | n/a | 1892 | [1] |
Intel 4004 | 92 kIPS at 740 kHz[2] | 0.124 | 1971 | |
IBM System/370 model 158-3 | 1 MIPS | 1 | 1972 | |
Intel 8080 | 640 kIPS at 2 MHz | 0.32 MIPS/MHz | 1974 | |
VAX-11/780 | 500 kIPS | 0.5 | 1977 | |
Motorola 68000 | 1 MIPS at 8 MHz | 0.125 MIPS/MHz | 1979 | |
Intel 286 | 2.66 MIPS at 12 MHz | 0.22 MIPS/MHz | 1982 | [3] |
Motorola 68020 | 4 MIPS at 20 MHz | 0.2 MIPS/MHz | 1984 | |
ARM2 | 4 MIPS at 8 MHz | 0.5 MIPS/MHz | 1986 | |
Motorola 68030 | 11 MIPS at 33 MHz | 0.33 MIPS/MHz | 1987 | |
Intel 386DX | 8.5 MIPS at 25 MHz | 0.34 MIPS/MHz | 1988 | |
Motorola 68040 | 44 MIPS at 40 MHz | 1.1 MIPS/MHz | 1990 | |
Intel 486DX | 54 MIPS at 66 MHz | 0.818 MIPS/MHz | 1992 | |
Motorola 68060 | 88 MIPS at 66 MHz | 1.33 MIPS/MHz | 1994 | |
Intel Pentium Pro | 541 MIPS at 200 MHz | 2.705 MIPS/MHz | 1996 | [4] |
ARM 7500FE | 35.9 MIPS at 40 MHz | 0.897 MIPS/MHz | 1996 | |
PowerPC G3 | 525 MIPS at 233 MHz | 2.253 MIPS/MHz | 1997 | |
Zilog eZ80 | 80 MIPS at 50 MHz | 1.6 MIPS/MHz | 1999 | [5] |
Intel Pentium III | 1,354 MIPS at 500 MHz | 2.708 MIPS/MHz | 1999 | |
Freescale MPC8272 | 760 MIPS at 400 MHz | 1.9 MIPS/MHz | 2000 | [6] Integrated Communications Processors |
AMD Athlon | 3,561 MIPS at 1.2 GHz | 2.967 MIPS/MHz | 2000 | |
AMD Athlon XP 2400+ | 5,935 MIPS at 2.0 GHz | 2.967 MIPS/MHz | 2002 | |
Pentium 4 Extreme Edition | 9,726 MIPS at 3.2 GHz | 3.039 MIPS/MHz | 2003 | |
ARM Cortex A8 | 2,000 MIPS at 1.0 GHz | 2.0 MIPS/MHz | 2005 | [7] |
AMD Athlon FX-57 | 12,000 MIPS at 2.8 GHz | 4.285 MIPS/MHz | 2005 | |
AMD Athlon 64 3800+ X2 (Dual Core) | 14,564 MIPS at 2.0 GHz | 7.282 MIPS/MHz | 2005 | [8] |
Xbox360 IBM “Xenon” Triple Core | 19,200 MIPS at 3.2 GHz | 2.0 MIPS/MHz | 2005 | |
PS3 Cell BE (PPE only) | 10,240 MIPS at 3.2 GHz | 3.2 MIPS/MHz | 2006 | |
AMD Athlon FX-60 (Dual Core) | 18,938 MIPS at 2.6 GHz | 7.283 MIPS/MHz | 2006 | [8] |
Intel Core 2 Extreme X6800 | 27,079 MIPS at 2.93 GHz | 9.242 MIPS/MHz | 2006 | [8] |
Intel Core 2 Extreme QX6700 | 49,161 MIPS at 2.66 GHz | 18.481 MIPS/MHz | 2006 | [9] |
P.A. Semi PA6T-1682M | 8,800 MIPS at 2.0 GHz | 4.4 MIPS/MHz | 2007 | [10] |
Intel Core 2 Extreme QX9770 | 59,455 MIPS at 3.2 GHz | 18.580 MIPS/MHz | 2008 | [11] |
Intel Core i7 Extreme 965EE | 76,383 MIPS at 3.2 GHz | 23.860 MIPS/MHz | 2008 | [12] |
AMD Phenom II X4 940 Black Edition | 42,820 MIPS at 3.0 GHz | 14.273 MIPS/MHz | 2009 | [13] |
Timeline of instructions per second
Processor | Dhrystone MIPS | D IPS / clock cycles per second | D IPS / clock cycles per second / Cores per die | Year | Source |
Intel 4004 | 92 kIPS at 740 kHz (Not Dhrystone) | 0.1 | 0.1 | 1971 | [2] |
IBM System/370 model 158-3 | 1 Dhrystone MIPS | 1.0 | 0.1 | 1972 | |
Intel 8080 | 500 kIPS at 2 MHz (Not Dhrystone) | 0.3 | 0.3 | 1974 | |
MOS Technology 6502 | 500 kIPS at 1 MHz (Not Dhrystone) | 0.5 | 0.5 | 1975 | |
VAX-11/780 | 500 kIPS at 5 MHz 1 Dhrystone MIPS | 0.2 | 0.2 | 1977 | |
Motorola 68000 | 1 MIPS at 8 MHz (Not Dhrystone) | 0.1 | 0.1 | 1979 | |
Intel 286 | 2.66 MIPS at 12.5 MHz | 0.2 | 0.2 | 1982 | [3] |
Motorola 68020 | 4 MIPS at 20 MHz | 0.2 | 0.2 | 1984 | |
Intel 386DX | 11.4 MIPS at 33 MHz | 0.3 | 0.3 | 1985 | |
ARM2 | 4 MIPS at 8 MHz | 0.5 | 0.5 | 1986 | |
Motorola 68030 | 11 MIPS at 33 MHz | 0.3 | 0.3 | 1987 | |
Motorola 68040 | 44 MIPS at 40 MHz | 1.1 | 1.1 | 1990 | [4] |
DEC Alpha 21064 EV4 | 300 MIPS at 150 MHz | 2.0 | 2.0 | 1992 | [5] |
Intel 486DX | 54 MIPS at 66 MHz | 0.8 | 0.8 | 1992 | |
Motorola 68060 | 88 MIPS at 66 MHz | 1.33 | 1.33 | 1994 | |
Intel Pentium | 188 MIPS at 100 MHz | 1.88 | 1.88 | 1994 | [6] |
Microchip PIC16F | 5 MIPS at 20 MHz | 0.25 | 0.25 | 1995 | [7] |
Atmel megaAVR | 16 MIPS at 16 MHz | 1 | 1 | 1996 | [8] |
ARM 7500FE | 35.9 MIPS at 40 MHz | 0.9 | 0.9 | 1996 | |
Intel Pentium Pro | 541 MIPS at 200 MHz | 2.7 | 2.7 | 1996 | [9] |
PowerPC 750 | 525 MIPS at 233 MHz | 2.3 | 2.3 | 1997 | |
Zilog eZ80 | 80 MIPS at 50 MHz | 1.6 | 1.6 | 1999 | [10] |
Intel Pentium III | 2,054 MIPS at 600 MHz | 3.4 | 3.4 | 1999 | [6] |
Freescale MPC8272 | 760 MIPS at 400 MHz | 1.9 | 1.9 | 2000 | [11] Integrated Communications Processors |
AMD Athlon | 3,561 MIPS at 1.2 GHz | 3.0 | 3.0 | 2000 | |
AMD Athlon XP 2500+ | 7,527 MIPS at 1.83 GHz | 4.1 | 4.1 | 2003 | [6] |
Pentium 4 Extreme Edition | 9,726 MIPS at 3.2 GHz | 3.0 | 3.0 | 2003 | |
MIPS32 4KEc | 356 MIPS at 233 MHz | 1.5 | 1.5 | 2004 | [12] |
Microchip PIC10F | 1 MIPS at 4 MHz | 0.25 | 0.25 | 2004 | [13][14] |
ARM Cortex-M3 | 125 MIPS at 100MHz | 1.25 | 1.25 | 2004 | [15] |
Nios II/f | 190 MIPS at 165 MHz | 1.13 | 1.13 | 2004 | [16] |
ARM Cortex-A8 | 2,000 MIPS at 1.0 GHz | 2.0 | 2.0 | 2005 | [17] |
VIA C7 | 1,799 MIPS at 1.3 GHz | 1.4 | 1.4 | 2005 | [18] |
AMD Athlon FX-57 | 12,000 MIPS at 2.8 GHz | 4.3 | 4.3 | 2005 | |
AMD Athlon 64 3800+ X2 (Dual core) | 14,564 MIPS at 2.0 GHz | 7.3 | 3.6 | 2005 | [19] |
Xbox360 IBM “Xenon” (Triple core) | 19,200 MIPS at 3.2 GHz | 6.0 | 2.0 | 2005 | |
PS3 Cell BE (PPE only) | 10,240 MIPS at 3.2 GHz | 3.2 | 3.2 | 2006 | |
AMD Athlon FX-60 (Dual core) | 18,938 MIPS at 2.6 GHz | 7.3 | 3.6 | 2006 | [19] |
Intel Core 2 Extreme X6800 (Dual core) | 27,079 MIPS at 2.93 GHz | 9.2 | 4.6 | 2006 | [19] |
Intel Core 2 Extreme QX6700 (Quad core) | 49,161 MIPS at 2.66 GHz | 18.4 | 4.6 | 2006 | [20] |
MIPS32 24K | 604 MIPS at 400 MHz | 1.51 | 1.51 | 2006 | [21] |
ARM Cortex-R4 | 450 MIPS at 270 MHz | 1.66 | 1.66 | 2006 | [22] |
MIPS64 20Kc | 1,370 MIPS at 600 MHz | 2.3 | 2.3 | 2007 | [23] |
P.A. Semi PA6T-1682M | 3,084 MIPS at 1.8 GHz | 4.4 | 4.4 | 2007 | [24] |
Intel Core 2 Extreme QX9770 (Quad core) | 59,455 MIPS at 3.2 GHz | 18.6 | 4.6 | 2008 | [25] |
Intel Core i7 920 (Quad core) | 82,300 MIPS at 2.66 (Turbo 2.93) GHz | 30.9 | 7.7 | 2008 | [26] |
Intel Atom N270 (Single core) | 3,846 MIPS at 1.6 GHz | 2.4 | 1.2 | 2008 | [27] |
ARM Cortex-M0 | 45 MIPS at 50MHz | 0.9 | 0.9 | 2009 | [28] |
ARM Cortex-A9 (Dual core) | 5,000 MIPS at 1.0 GHz | 5.0 | 2.5 | 2009 | [29] |
AMD E-350 (Dual core) | 10,000 MIPS at 1.6 GHz | 6.25 | 3.125 | 2011 | [30] |
AMD Phenom II X4 940 Black Edition | 42,820 MIPS at 3.0 GHz | 14.3 | 3.5 | 2009 | [31] |
AMD Phenom II X6 1100T | 78,440 MIPS at 3.3 GHz | 23.7 | 3.9 | 2010 | [26] |
ARM Cortex-A15 (Quad core) | 35,000 MIPS at 2.5 GHz | 14.0 | 3.5 | 2010 | [32] |
Intel Core i7 Extreme Edition 980X (Hex core) | 147,600 MIPS at 3.33 GHz | 44.7 | 7.46 | 2010 | [33] |
Intel Core i7 2600K | 128,300 MIPS at 3.4 GHz | 37.7 | 9.43 | 2011 | [34] |
Intel Core i7 875K | 92,100 MIPS at 2.93 GHz | 31.4 | 7.85 | 2011 | [35] |
AMD FX-8150 (Eight core) | 108,890 MIPS at 3.6 GHz | 30.2 | 3.78 | 2011 | [36] |
ARM11 | 515 MIPS at 412 MHz | 1.25 | 1.25 | 2002 | [37] |
ARM Cortex A7 | 2,850 MIPS at 1.5 GHz | 1.9 | 1.9 | 2011 | [38] |
Qualcomm Scorpion (Cortex A8-like) | 2,100 MIPS at 1 GHz | 2.1 | 2.1 | 2008 | [39] |
Qualcomm Krait (Cortex A9-like, Dual core) | 9,900 MIPS at 1.5 GHz | 6.6 | 3.3 | 2011 | [40] |
Intel Core i7 Extreme Edition 3960X (Hex core) | 177,730 MIPS at 3.33 GHz | 53.3 | 8.89 | 2011 | [41] |