GMP «Arithmetic without limitations» GMPbench results


GMPbench results. We have run the benchmark on the highest-frequency CPU of each type to which we have convenient access. Scaling to lower or higher frequencies should work well, since GMP mainly works off the caches. All CPUs run at their nominal frequencies; "turbo" has been disabled.

The GMPbench suite is available for download. To run the benchmarks, you also need to compile gexpr.c and put it somewhere in your path.

GMP exercises a particular set of processor capabilities, widening integer multiplication being the most important one. Processors with poor integer multiply support get worse scores on GMPbench than on other benchmarks.

GMPbench measures multiplication of same size and different size operands, squaring, division, gcd, and extended gcd, and then RSA encryption and π computation. That's it. GMP typically performs a whole lot more operations which are not measured at all.

Let us make it absolutely clear that GMP exercises just integer instructions, and that GMPbench thus is an integer benchmark. We often see claims to the contrary, i.e. that it is a floating-point benchmark.

GMP repo [measured at different times, therefore unfair] GMPbench 0.2 results


CPU
freq
MHz
A
B
I
Compiler/Compilation flags
base
multiply       divide        gcd        gcdext
app
rsa       pi
GMP-
bench
Score/
GHz
Date
measured
Xeon E3‑1270v5 (Skylake 8MB L3) 3600-4000 64 "gcc 6.4.0" -O2 -march=broadwell -mtune=skylake 769301,3 714601,3 129481,3 88231,3 101381,3 691,3 57091,3 2018‑04‑29
Ryzen 2700X (Pinnacle Ridge 16MB L3) 3700-4300 64 "gcc 6.4.0" -O2 -march=znver1 747371,2,4 720391,2,4 119931,2,4 85211,2,4 95891,2,4 67.11,2,4 55141,2,4 2018‑04‑26
Xeon E3‑1285L (Broadwell 6MB L3) 3400-3800 64 "gcc 6.4.0" -O2 -march=broadwell 683021,3 647341,3 119441,3 79441,3 91621,3 651,3 52011,3 2018‑04‑29
Ryzen 1500X (Summit Ridge 16MB L3) 3500-3900 64 "gcc 6.4.0" -O2 -march=znver1 679031,4 655461,4 108871,4 77071,4 87401,4 60.81,4 50081,4 2018‑05‑14
Xeon E3‑1271v3 (Haswell 8MB L3) 3600-4000 64 "gcc 6.4.0" -O2 -march=haswell 676061,3 609101,3 118601,3 78791,3 83511,3 621,3 49671,3 2018‑04‑29
Xeon E5‑1650v2 (Ivy Bridge 12MB L3) 3500 64 "gcc 4.5.3" -O2 -march=core2 520363 498853 91083 59463 67563 50.73 39563 11303 2015‑04‑30
Xeon E3‑1270 (Sandy Bridge 8MB L3) 3400-3800 64 "gcc 6.4.0" -O2 -march=sandybridge 508711,3 493221,3 92951,3 62861,3 66781,3 50.11,3 39351,3 2018‑04‑29
Phenom 1090T (K10 6MB L3) 3200-3600 64 "gcc 6.4.0" -O2 -march=amdfam10 467161 456741 78121 52231 65571 471 36461 2018‑04‑29
AMD FX 8350 (Piledriver 8MB L3) 4000-4200 64 "gcc 6.4.0" -O2 -march=bdver2 380591 389091 73921 48481 51031 40.81 30731 2018‑04‑29
AMD FX 4100 (Bulldozer 8MB L3) 3600-3800 64 "gcc 6.4.0" -O2 -march=bdver1 332771 335071 60771 39731 43901 35.41 26361 2018‑04‑29
Xeon X3470 (Lynnfield 8 MB L3) 2933-3600 64 "gcc 6.4.0" -O2 -march=corei7 320463 304803 58623 39443 41383 33.13 24913 2018‑04‑29
POWER7 / SMT-4 3550 64 "gcc 4.8.3" -O3 -mtune=power7 339113 306473 50963 37023 39163 35.33 24793 6983 2016‑05‑22
POWER8 / SMT-4 3425 64 "gcc 4.9.2" -O3 -mtune=power8 295173 283233 47883 37013 35403 34.73 23103 7103 2016‑05‑22
Xeon E3110 (Penryn 6 MB L2) 3000 64 "gcc 4.9.2" -O2 -march=core2 279653 253383 51473 32553 34963 30.03 21493 2018‑05‑14
Intel Atom C3758 (Goldmont) 2200 64 "gcc 6.4.0" -O2 -march=slm 200183 200353 35393 24323 29703 21.93 16423 2018‑04‑29
Arm X-Gene 1 2400 64 "gcc 4.8.4" -O2 17208 18879 3513 2337 2297 19.3 1434 598 2017‑03‑14
AMD 5350 (Jaguar) 2050 64 "gcc 4.9.2" -O2 -march=btver2 15335 17356 2946 2023 2100 17.2 1283 626 2016‑06‑06
Arm Cortex-A57 2000 64 "gcc 4.8.5" -O2 -fomit-frame-pointer 14520 16147 3044 1888 1850 16.9 1209 2017‑02‑19
Intel Atom C2758 (Silvermont) 2400 64 "gcc 6.4.0" -O2 -march=slm 120973 146243 23973 15493 16593 14.23 10353 2018‑05‑14
AMD E-350 (Bobcat) 1600 64 "gcc 4.8.4" -O2 -march=btver1 10877 13004 2139 1503 1603 12.7 951 594 2016‑06‑06
Pentium 4 (Nocona) 3400 64 "gcc" -O2 -mtune=nocona 116843 122923 22513 15083 13823 12.83 9243 2723
POWER6 3500 64 "xlc" -O2 -qarch=pwr6 105613 114013 21103 12923 11333 13.03 8413 2403
Arm Cortex-A15 2000 32 "gcc 5.2.1" -O2 -fomit-frame-pointer 10121 10078 1983 1396 1162 12.2 812 406 2016‑03‑21
IBM z10 4400 64 "gcc 4.8.4" -O2 -march=z10 7268 9476 1701 980 818 9.09 620 141 2015‑04‑30
Arm Cortex-A53 1500 64 "gcc 5.3" -O2 -fomit-frame-pointer 5969 8511 1658 980 772 7.83 558 373 2016‑03‑28
Athlon32 2083 32 "gcc 4.5.3" -O2 -fomit-frame-pointer 6088 6934 1446 950 644 8.37 519 249 2015‑05‑18
Intel Atom 330 1600 64 "gcc 4.4.1" -O2 4592 5223 986 589 500 5.66 374 234
Arm Cortex-A9 1200 32 "gcc 4.6.3" -O2 -fomit-frame-pointer 4581 4486 957 650 586 4.22 355 296 2015‑05‑21

Table Footnotes

  1. Measurements were performed on an idle system with automated hardware up-clocking ("Turbo") enabled.
  2. Our Ryzen 2700X system reports frequent parity errors from its UOP cache. It is unknown what effects these CPU hardware errors have on the CPU's operation. There are many reports on the Net about this issue, so it's very likely a CPU bug. Furthermore, the system freezes reproducibly during GMP test runs; it happens when the load goes from high to low and the CPU up-clocks itself. Performance results should be taken with a grain of salt.
  3. These results are without or with incomplete Meltdown or Spectre mitigations. Results published here are probably somewhat inflated.
  4. These results are without or with incomplete Spectre mitigations. Results published here are probably somewhat inflated.



GMP 5.0.1 GMPbench 0.2 results


CPU
freq
MHz
A
B
I
Compiler/Compilation flags
base
multiply  divide gcd gcdext
app
rsa       pi
GMP
bench
Score/
GHz
Opteron/Athlon64 K10 6MB L3 3200 64 "gcc 4.3.3" -O2 -m64 -mtune=k8 40879 37617 6189 3918 5226 39.4 2985 933
Core i5 2500 (Sandy Bridge) 3300 64 "gcc 4.4.5" -O2 -m64 38560 37308 6357 4173 5173 38.1 2943 891
Core i7 920 (Nehalem) 2667 64 "gcc 4.2.1" -O2 -m64 25737 23708 4416 2904 3284 26.8 1962 735
Core 2 E6400 (Conroe) 2133 64 "gcc 4.2.1" -O2 -m64 19209 17351 3385 2097 2422 20.7 1466 687
PowerPC 970 ("G5") 2700 64 "gcc 4.0.1-5370" -O3 -m64 -mtune=970 12601 14658 2579 1464 1391 15 1013 375
Itanium 2 1300 64 "gcc 4.2.4" -O2 -m64 16290 11175 2336 1384 1207 16.1 980 735
VIA Nano 1600 64 "gcc 4.3.4" -O2 -m64 12202 10588 2379 1420 1703 12.4 950 594
Pentium 4 (Nocona) 3400 64 "gcc 4.2.1" -O2 -m64 11457 11914 2148 1357 1447 12.8 915 269
AMD Bobcat 1600 64 "gcc 4.2.1" -O2 11115 11533 2143 1331 1526 11.7 895 559
Pentium 4 (Northwood) 2600 32 "gcc 4.2.1" -O2 -fomit-frame-pointer -march=pentium4 5538 5280 1225 740 666 7.5 462 178
Intel Atom 330 1600 64 "gcc 4.4.1" -O2 -m64 4422 5174 896 502 498 5.6 362 226
UltraSPARC 3 1593 64 "gcc 3.4.4" -O2 -m64 4125 4168 926 547 392 5.7 330 207
Alpha 21264 500 64 "gcc 3.3.3" -O2 -mcpu=ev6 3492 3592 666 445 449 4.2 286 572


GMP 4.3.x GMPbench 0.2 results


CPU
freq
MHz
A
B
I
Compiler/Compilation flags
base
multiply  divide gcd gcdext
app
rsa       pi
GMP
bench
Score/
GHz
Opteron/Athlon64 K10 6MB L3 3200 64 "gcc 4.3.3" -O2 -m64 -mtune=k8 39826 24748 5953 3729 4956 37 2669 834
Core i7 920 (Nehalem) 2667 64 "gcc 4.2.1" -O2 -m64 23842 14217 4375 2782 3083 23 1683 631
Core 2 E6400 (Conroe) 2133 64 "gcc 4.2.1" -O2 -m64 17981 10656 3312 2035 2330 18 1276 598
PowerPC 970 ("G5") 2700 64 "gcc 4.0.1-5367" -O3 -m64 -mcpu=970 12364 9349 2412 1489 1577 14 946 350
Itanium 2 1300 64 "gcc 4.2.1" -O2 -m64 15578 7983 2260 1342 1294 14.6 909 699
Pentium 4 (Nocona) 3200 64 "gcc 4.2.1" -O2 -m64 10975 6968 1938 1315 1468 11.3 799 250
Pentium 4 (Northwood) 2600 32 "gcc 4.2.1" -O2 -fomit-frame-pointer -march=pentium4 5162 2874 1163 707 654 6.5 394 152
UltraSPARC 3 1593 64 "gcc 3.4.4" -O2 -m64 3733 2488 956 533 370 5.1 286 180
Alpha 21264 500 64 "gcc 3.3.3" -O2 -mcpu=ev6 3208 2277 654 446 447 3.8 256 512
Pentium MMX 233 32 "gcc 3.4.4" -O2 -fomit-frame-pointer 264 175 71 42 27 0.38 21 90

Notes:
  1. The last column, "Possible Score/GHz", is an estimate of what could be attained by implementing known optimisations to GMP for this processor.

GMP 4.3.x GMPbench 0.1 results


CPU
freq
MHz
A
B
I
Compiler/Compilation flags
base
multiply divide
app
rsa
GMPbench Score/
GHz
Opteron/Athlon64 K10 2300 64 "gcc 3.4.3" -O2 -m64 -mtune=k8 81633 42278 3606 14554 6328
Opteron/Athlon64 K8/K9 2200 64 "gcc 3.4.6" -O2 -m64 -mtune=k8 69279 40081 3232 13050 5932
Core 2 E6400 (65nm) 2133 64 "gcc 4.2.1" -O2 -m64 -mtune=k8 51519 24316 2314 9050 4249
Pentium 4 (Nocona) 3200 64 "gcc 3.4.4" -O3 -m64 -mtune=k8 31259 16412 1427 5685 1777
PowerPC 970 ("G5") 1600 64 "gcc 4.0.1 build 5367" -mcpu=970 -O3 22119 12198 916 3880 2425
Alpha 21264   64            
Athlon XP   32            
Pentium 4 Prescott   32            
Pentium 4 (Northwood) 2600 32 "gcc 3.4.6" -O2 -fomit-frame-pointer -march=pentium4 16133 6726 680 2661 1023
Pentium 3 / Pentium M   32            
Atom 1600 64 "gcc 4.2.1" -O3 -m64 -mtune=k8 12471 6940 457 2063 1289
UltraSPARC 3 1593 64   11066 5942 370 1732  
PowerPC 7447 ("G4")   32            
Alpha 21164A   64            

Notes:
  1. The clock frequencies for the above measures are not the same as for GMP 4.2, since we didn't have access to the same hardware. However, we have remeasured some of the 4.2 numbers and updated the table below.
  2. The last column, "Optimal", is an estimate of what could be attained by writing optimised assembly code for this processor.

GMP 4.2.x GMPbench 0.1 results


CPU
freq
MHz
A
B
I
Compiler/Compilation flags
base
multiply divide
app
rsa
GMPbench Score/
GHz
Opteron/Athlon64 K10 2300 64 "gcc 3.4.3" -O2 -m64 -mtune=k8 43473 23880 2178 8377 3642
Opteron/Athlon64 K8/K9 2200 64 "gcc 3.4.6" -O2 -m64 -mtune=k8 38362 21621 1979 7549 3431
Core 2 E6400 (65nm) 2133 64 "gcc 4.2.1" -O2 -m64 -mtune=k8 36902 20330 2092 7570 2523
PowerPC 970 ("G5") 2700 64 "gcc 4.0.1 build 5367" -mcpu=970 -fast 27740 16500 1409 5490 2033
Pentium 4 3200 64 "gcc 3.4.4" -O2 -m64 -mtune=k8 19425 10525 929 3645 1139
Alpha 21264 1000 64 "gcc 4.1.2" -O3 -mcpu=ev67 18703 11272 913 3641 3641
Itanium 2 1600 64 "gcc 4.1.1" -O3 -mtune=itanium2 19744 10340 799 3379 2112
Athlon XP 2083 32 "gcc 4.0.2" -O2 -fomit-frame-pointer 15682 7902 624 2636 1265
Pentium 4 Prescott 3000 32 "gcc 4.0.2" -O2 -fomit-frame-pointer -march=pentium4 15123 6189 675 2556  
Pentium 4 (Northwood) 2600 32 "gcc 3.4.6" -O2 -fomit-frame-pointer -march=pentium4 14111 5468 569 2236  
Pentium 3 / Pentium M 1862 32 "gcc 3.4.4" -O2 -fomit-frame-pointer 11381 5286 429 1824  
UltraSPARC 3 1593 64 "gcc 3.4.4" -O2 -mcpu=ultrasparc 10597 5349 368 1665  
HPPA 8800 800 64 "cc B.11.X.32509-32512.GP" +DD64 +O2 9466 3631 385 1503  
Atom 1600 64 "gcc 4.2.1" -O2 -m64 -mtune=k8 6737 4465 320 1325 828
PowerPC 7447 ("G4") 1420 32 "gcc 4.1.0" -O2 -mpowerpc -mcpu=7450 6080 3479 247 1066  
Alpha 21164A 600 64 "gcc 4.1.2" -O3 -mcpu=ev56 3964 2122 179 721  

GMP 4.1.x results


CPU
freq
MHz
A
B
I
Compiler/Compilation flags
base
multiply divide
app
rsa
GMPbench
Optimal
(see note)
Opteron/Athlon64 2400 64 "gcc 3.4.2" -O2 -mcpu=nocona -funroll-loops
(NB! no asm code)
27321 18280 1441 5675  
PowerPC 970 ("G5") 2500 64 "gcc 3.4" -O3 20324 12874 1110 4238  
Opteron/Athlon64 2400 32 "gcc 3.3.3" -O2 -fomit-frame-pointer
(NB! 32-bit only)
19127 9823 802 3316  
Alpha 21264 1000 64 "gcc 2.9-gnupro-99r1" -O2 16813 10706 782 3240  
Pentium 4 3200 64 "gcc 4.0.2" -O2 -m64 -mtune=k8
(NB! No asm code)
15613 9186 814 3122  
Itanium 2 1600 64 "gcc 3.4.3" -O2
(NB! Low-quality asm code)
17046 9027 749 3047  
Athlon XP 2083 32 "gcc 3.3.2" -O2 -fomit-frame-pointer 14076 7731 616 2535  
Pentium 4 (Northwood) 2800 32 "gcc 3.3.2" -O2 -fomit-frame-pointer -march=pentium4 13013 5770 586 2253  
Pentium 4 Prescott 3000 32 "gcc 3.3.2" -O2 -fomit-frame-pointer -march=pentium4 13348 5393 574 2206  
POWER 4 1100 64 "gcc 3.2.1" -O2 -maix64 -mpowerpc64 -mtune=power3 8951 5920 478 1863  
Pentium 3 / Pentium M 1862 32 "gcc 3.4.4" -O2 -fomit-frame-pointer 8125 4712 393 1560  
HPPA 8800 800 64 "cc B.11.11.30766" +DD64 +O2 9040 3724 362 1450  
UltraSPARC 3 1336 64 "gcc 3.4.4" -O2 -m64 -mptr64 -mcpu=v9 6111 3645 265 1119  
MIPS R14000 500 64 cc 7.3.0 5284 2819 241 964  
PowerPC 74x7 ("G4") 1000 32 "gcc 3.3.3" -O2 -mpowerpc 3453 2203 165 676  
POWER 3 475 64 "gcc 2.9-aix51-020209" -maix64 -mpowerpc64 -O2 3647 2259 157 671  
Alpha 21164A 600 64 "gcc 3.2.1" -O2 3514 2185 158 663  
VIA C3 Nehemiah 1000 32 "gcc 3.4.2" -O2 -fomit-frame-pointer -march=c3-2 2378 1314 111 442  
UltraSPARC 2i 400 64 "gcc 3.2.2" -O2 -mcpu=ultrasparc 1971 900 89 343  

Notes: