The Computer Language
25.03 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,933 1582 5.56
* Intel C #6 2.25 8.91 3,625 1582 4.46
* Intel C #4 13.39 13.39 2,830 1190 4.38
* C clang #4 13.39 13.39 2,343 1190 5.32
Intel C #5 7.77 30.80—30.95 5,378 917 4.46
C clang #5 8.10 32.01—32.15 4,792 917 5.61
* C clang #2 8.68 34.14—34.46 2,703 1563 5.59
* Intel C #2 8.70 34.11—34.19 3,457 1563 4.27
C clang #3 34.14 34.19—34.26 2,351 574 5.16
Intel C #3 34.59 34.60 2,896 574 4.16
C clang #8 36.35 36.38—36.47 2,347 483 5.08
C clang 36.52 36.54—36.63 2,347 514 5.39
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,494 1639 6.10
* Intel C #4 3.64 3.63—3.69 2,933 1398 5.29
* C clang #5 4.86 4.86 2,417 1436 5.03
C clang #6 5.17 5.17 2,970 1186 5.19
C clang 5.38 5.40 2,974 1179 5.35
C clang #2 5.43 5.44 2,982 1270 5.30
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,941 1398 6.20
C clang #8 5.70 5.70—5.75 2,941 1195 5.20
Intel C #8 6.01 6.06—6.10 3,039 1195 4.42
C clang #3 6.13 6.13 2,978 1214 5.65
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.79 2,974 1250 5.16
spectral-norm      
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
* C clang #6 0.39 1.52—1.56 4,706 1203 6.40
* 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 #5 0.73 2.87 5,206 576 5.85
* C clang #4 0.73 2.88—2.92 5,366 1145 5.86
* 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
* C clang #2 0.73 4.15—6.50 5,411 941 6.35
* Intel C #5 0.73 2.89 5,464 576 4.76
C clang #8 5.41 5.42 3,211 389 5.20
C clang #3 1.45 5.74 5,390 470 5.53
* C clang #7 1.85 8.31—9.99 5,399 906 6.27
* Intel C #2   Empty  
mandelbrot      
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
C clang #9 1.23 4.91 36,614 700 5.36
C clang #5 1.54 6.10 36,893 788 5.17
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.85—13.93 36,458 805 5.13
* C clang 3.50 13.95 35,627 828 5.30
* C clang #7 3.53 14.02 36,758 1000 5.70
* C clang #3 3.56 14.16—14.22 35,484 769 5.23
Intel C #8 23.98 23.98 2,839 412 4.38
C clang #8 25.48 25.50—25.55 2,359 412 5.04
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.78 0.78 2,257 1469 5.10
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,208 1286 5.41
Intel C #2 1.44 1.44 2,773 1299 4.29
C clang #2 2.44 2.44 2,200 1299 5.46
Intel C 2.93 2.93 2,945 1213 4.41
C clang #6 1.05 3.05 5,104 1936 5.36
Intel C #7 0.83 3.28 6,611 2276 4.52
C clang #7 0.83 3.28—3.32 5,947 2276 5.40
C clang 3.47 3.47 2,396 1213 5.07
Intel C #8 7.86 7.90—7.98 2,679 839 4.23
C clang #8 8.09 8.19—8.30 2,200 839 4.95
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.34 13.99—14.10 134,189 1512 5.85
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.46 0.65 514,040 1899 6.27
C clang #9 0.48 0.72 514,277 1551 5.42
Intel C #9 0.48 0.74 514,642 1551 4.34
Intel C #2 1.17 1.70 1,022,149 757 4.32
C clang #2 1.19 1.72 1,021,899 757 5.27
C clang #5 2.01 2.07—2.12 1,020,629 654 5.18
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.79 3.80 514,073 716 5.07
C clang #6 1.08 4.26—4.30 699,249 828 5.14
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.68 5.26—6.08 176,222 816 2.58
Intel C #2 1.71 5.41 176,718 816 4.92
C clang #3 1.92 5.90 138,723 842 5.80
Intel C #3 2.04 6.23 139,166 842 5.57
C clang 17.86 17.75—18.31 271,938 660 5.22
Intel C 17.90 17.93—18.09 271,843 660 4.31
C clang #5 9.24 33.44—33.54 361,550 914 5.00
Intel C #5 9.21 33.41—33.58 362,066 914 4.15
pidigits      [ Contentious. Different libraries. ]
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
C clang #2 0.74 0.74 3,990 422 5.46
Intel C #2 0.74 0.74 4,506 422 4.39
Intel C 0.75 0.74 4,448 459 4.39
C clang 0.75 0.75 3,719 459 5.06
regex-redux      [ Contentious. Different libraries. ]
  elapsed Mean or 95% CI      
source secs cpu secs mem gz make
C clang #5 0.84 2.84 159,756 1403 5.28
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.23 3.23 106,799 1121 5.07
C clang #4 1.00 3.84—3.89 159,789 1237 5.30
Intel C #4 1.06 4.08—4.13 160,281 1237 4.44
C clang #3 1.76 4.33—4.37 109,871 1273 5.44
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 19.1.1 (1ubuntu1)