The Computer Language
25.02 Benchmarks Game

Intel C versus C clang

How the programs are written matters! Always look at the source code.

If the fastest programs are flagged * possible hand-written vector instructions or "unsafe" or naked ffi, does the host language matter? You might be more interested in the less optimised programs — more seconds, less gz source code.

fannkuch-redux      
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
* C clang #6 2.25 8.88 2,941 1582 5.47
* Intel C #6 2.25 8.91 3,625 1582 4.46
* C clang #4 13.38 13.39 2,351 1190 5.22
* Intel C #4 13.39 13.39 2,830 1190 4.38
Intel C #5 7.77 30.80—30.95 5,378 917 4.46
C clang #5 8.13 32.00—32.15 4,764 917 5.37
* Intel C #2 8.70 34.11—34.19 3,457 1563 4.27
C clang #3 34.18 34.19—34.26 2,355 574 5.02
* C clang #2 8.70 34.15—34.33 2,945 1563 5.27
Intel C #3 34.59 34.60 2,896 574 4.16
C clang #8 36.36 36.44—36.51 2,347 483 5.13
C clang 36.52 36.54—36.63 2,347 514 5.35
Intel C #8 42.87 42.88—43.00 2,892 483 4.15
Intel C 43.45 43.42—43.59 2,896 514 4.22
n-body      
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
* Intel C #9 2.04 2.04 2,966 1639 5.24
* C clang #9 2.20 2.20 2,417 1639 6.15
* Intel C #4 3.64 3.63—3.69 2,933 1398 5.29
* C clang #5 4.86 4.86 2,470 1436 5.17
C clang #6 5.17 5.17 2,970 1186 5.42
C clang 5.38 5.39 2,978 1179 5.06
C clang #2 5.43 5.43 2,966 1270 5.25
Intel C #7 5.55 5.54—5.58 2,961 1250 4.46
* Intel C #5 5.57 5.57 2,937 1436 4.23
* C clang #4 5.60 5.61 2,953 1398 6.30
C clang #8 5.70 5.56—6.19 2,961 1195 5.27
Intel C #8 6.01 6.06—6.10 3,039 1195 4.42
C clang #3 6.13 6.13 2,966 1214 5.26
Intel C #3 6.18 6.13—6.46 2,970 1214 4.42
Intel C #6 6.20 6.23 2,970 1186 4.50
Intel C 6.24 6.26 2,970 1179 4.46
Intel C #2 6.24 6.23—6.39 2,966 1270 4.30
C clang #7 6.78 6.80 2,966 1250 5.05
spectral-norm      
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
* C clang #6 0.39 1.55 4,686 1203 6.45
* Intel C #6 0.40 1.54—1.58 5,321 1203 5.45
Intel C #8 2.67 2.68 3,215 389 4.71
* C clang #4 0.73 2.87 5,382 1145 5.66
* C clang #5 0.73 2.87—2.91 5,403 576 5.55
* Intel C #7 0.73 2.87 5,439 906 5.57
Intel C #3 0.73 2.87—2.92 5,399 470 4.60
* Intel C #4 0.73 2.88 5,382 1145 4.79
* Intel C #5 0.73 2.89 5,464 576 4.76
* C clang #2 0.74 4.30—7.09 5,288 941 6.43
C clang #8 5.41 5.42 3,211 389 5.15
C clang #3 1.45 5.75—5.79 5,423 470 5.58
* C clang #7 1.84 8.98—10.12 5,439 906 6.66
* Intel C #2   Empty  
mandelbrot      
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
C clang #9 1.24 4.92 36,811 700 5.32
C clang #5 1.54 6.10 37,044 788 5.35
Intel C #9 1.83 7.27 36,909 700 4.32
* Intel C #7 3.14 12.40 37,278 1000 4.62
* Intel C #4 3.22 12.81—12.87 36,958 805 4.24
* Intel C 3.26 12.99 35,803 828 4.36
* Intel C #3 3.32 13.23 35,529 769 4.37
* C clang #4 3.49 13.89—13.95 36,102 805 5.26
* C clang 3.51 13.95 35,643 828 5.65
* C clang #7 3.54 14.02—14.06 36,491 1000 5.49
* C clang #3 3.56 14.16—14.20 35,418 769 5.06
Intel C #8 23.98 23.98 2,839 412 4.38
C clang #8 25.51 25.52 2,359 412 5.22
Intel C #5   Bad Output  
* C clang #6   Empty  
* Intel C #6   Empty  
fasta      
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
C clang #3 0.79 0.79 2,273 1469 4.57
Intel C #3 0.84 0.83 2,793 1469 4.71
Intel C #5 1.06 1.06 2,937 1286 4.44
C clang #5 1.20 1.20 2,204 1286 5.64
Intel C #2 1.44 1.44 2,773 1299 4.29
C clang #2 2.44 2.44 2,163 1299 5.14
Intel C 2.93 2.93 2,945 1213 4.41
C clang #6 1.04 3.05 5,272 1936 5.40
Intel C #7 0.83 3.28 6,611 2276 4.52
C clang #7 0.83 3.28—3.32 5,861 2276 5.29
C clang 3.47 3.47 2,392 1213 5.28
Intel C #8 7.86 7.90—7.98 2,679 839 4.23
C clang #8 8.08 8.14—8.25 2,200 839 5.08
Intel C #4   Empty  
Intel C #6   Timed Out  
C clang #4   Empty  
k-nucleotide      
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
Intel C 6.12 13.40—13.51 134,566 1512 4.77
C clang 6.27 13.93—14.23 134,038 1512 6.01
reverse-complement      
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
* Intel C #7 0.45 0.64 514,732 1899 5.28
* C clang #7 0.45 0.61—0.67 514,220 1899 6.22
C clang #9 0.47 0.72 514,216 1551 5.13
Intel C #9 0.48 0.74 514,642 1551 4.34
C clang #2 1.17 1.70 1,021,891 757 5.17
Intel C #2 1.17 1.70 1,022,149 757 4.32
C clang #5 1.97 2.03—2.09 1,020,813 654 5.16
Intel C #5 2.14 2.14 1,021,334 654 4.55
* Intel C #4 3.76 3.79 514,626 716 4.22
* C clang #4 3.77 3.78 514,023 716 4.93
C clang #6 1.05 4.15—4.20 714,764 828 5.90
Intel C #6 1.08 4.25—4.29 750,670 828 4.27
binary-trees      [ Contentious. Different approaches. ]
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
C clang #2 1.66 5.23—6.05 176,116 816 5.77
Intel C #2 1.71 5.41 176,718 816 4.92
C clang #3 1.91 5.90 138,719 842 5.90
Intel C #3 2.04 6.23 139,166 842 5.57
C clang 17.72 17.78—18.29 271,938 660 5.20
Intel C 17.90 17.93—18.09 271,843 660 4.31
Intel C #5 9.21 33.41—33.58 362,066 914 4.15
C clang #5 9.25 33.42—33.59 361,689 914 4.96
pidigits      [ Contentious. Different libraries. ]
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
Intel C #2 0.74 0.74 4,506 422 4.39
C clang #2 0.74 0.74 3,990 422 5.19
Intel C 0.75 0.74 4,448 459 4.39
C clang 0.75 0.75 3,731 459 5.35
regex-redux      [ Contentious. Different libraries. ]
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
C clang #5 0.83 2.82 159,736 1403 5.40
Intel C #5 0.90 2.89—2.93 160,592 1403 4.64
Intel C #2 3.22 3.22 107,491 1121 4.35
C clang #2 3.22 3.22 106,783 1121 5.07
C clang #4 0.99 3.82—3.86 159,539 1237 5.11
Intel C #4 1.06 4.08—4.13 160,281 1237 4.44
C clang #3 1.76 4.34 109,867 1273 5.08
Intel C #3 1.84 4.43 110,412 1273 4.70
Intel C

Intel(R) oneAPI DPC++/C++ Compiler
2024.1.0.20240308

C clang

Ubuntu clang version 18.1.8 (11)