The Computer Language
24.06 Benchmarks Game

C clang versus Chapel fastest performance

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

If the fastest programs are hand-written vector instructions, does the host language matter? You might be more interested in the less optimised programs — more seconds, less gz source code.

fannkuch-redux
source secs mem gz cpu secs
C clang #6 2.25 19,940 1582 8.89
C clang #4 13.18 19,684 1190 13.18
C clang #5 8.08 19,940 917 31.87
Chapel #2 8.40 19,596 737 33.50
C clang #3 34.04 19,684 574 34.04
C clang #2 8.88 19,684 1563 34.87
C clang 37.45 19,684 514 37.45
n-body
source secs mem gz cpu secs
C clang #9 2.20 19,684 1639 2.20
Chapel #3 3.89 19,672 967 3.90
Chapel #4 4.58 19,656 1027 4.59
C clang #4 4.63 19,684 1496 4.63
C clang #5 4.86 19,684 1436 4.86
C clang #6 5.32 19,684 1186 5.32
C clang #2 5.50 19,684 1270 5.50
C clang 5.51 19,716 1179 5.51
C clang #8 5.59 19,748 1398 5.59
Chapel #2 5.64 19,672 977 5.65
C clang #3 6.12 19,684 1214 6.11
C clang #7 6.77 19,684 1250 6.77
spectral-norm
source secs mem gz cpu secs
C clang #6 0.40 20,980 1203 1.57
C clang #5 0.72 19,700 576 2.87
Chapel #2 0.73 19,688 348 2.88
C clang #8 0.73 19,700 941 2.88
C clang #4 0.73 20,820 1145 2.89
C clang 5.40 19,700 390 5.40
C clang #3 1.44 20,916 470 5.75
Chapel 1.46 19,688 322 5.78
C clang #7 1.84 20,756 906 7.28
mandelbrot
source secs mem gz cpu secs
Chapel #3 1.18 38,016 582 4.65
C clang #9 1.23 34,304 700 4.89
C clang #8 1.53 34,688 788 6.09
C clang #4 3.47 34,176 805 13.83
C clang 3.49 33,024 828 13.92
C clang #7 3.53 34,048 1000 14.02
C clang #3 3.58 32,896 769 14.26
C clang #2 25.50 19,684 412 25.49
Chapel 6.64 37,632 447 26.47
C clang #6   Make Error  
pidigits
source secs mem gz cpu secs
Chapel #4 0.75 19,720 515 0.76
Chapel #2 0.76 19,976 423 0.77
C clang #2 0.82 19,780 422 0.82
C clang 0.88 19,876 459 0.88
regex-redux
source secs mem gz cpu secs
C clang #5 0.82 154,520 1403 2.82
C clang #2 3.22 103,424 1121 3.22
C clang #4 0.97 154,248 1237 3.77
C clang #3 1.74 105,728 1273 4.32
Chapel #3 3.86 552,600 503 4.79
Chapel #2 4.61 552,604 498 5.55
fasta
source secs mem gz cpu secs
C clang #9 0.78 19,684 1469 0.78
Chapel #6 0.79 19,636 1108 0.80
C clang #5 1.19 19,684 1286 1.19
C clang #8 2.43 19,684 1299 2.43
C clang #6 1.01 19,684 1936 2.96
C clang #2 0.82 19,684 2276 3.26
C clang #7 0.85 19,684 2018 3.31
Chapel #5 0.95 19,620 1391 3.46
C clang 3.61 19,860 1213 3.61
Chapel #3 4.02 19,640 1219 4.03
C clang #3 4.58 19,860 825 4.58
C clang #4   Make Error  
k-nucleotide
source secs mem gz cpu secs
C clang 6.37 129,248 1512 13.99
Chapel #4 4.96 197,504 1071 17.08
Chapel #3 5.91 201,216 1040 20.80
reverse-complement
source secs mem gz cpu secs
C clang #7 0.44 499,748 1899 0.61
C clang #8 0.46 499,876 1551 0.70
C clang #2 1.15 994,560 757 1.67
C clang #5 2.07 994,176 654 2.07
Chapel #8 0.95 1,057,024 1260 2.75
Chapel #3 1.87 2,133,504 709 3.46
Chapel #5 2.00 2,133,504 554 3.55
C clang #4 3.79 500,480 716 3.79
C clang #6 1.02 706,096 828 4.04
binary-trees
source secs mem gz cpu secs
C clang #2 1.64 170,112 816 5.30
C clang #3 1.84 134,144 842 5.79
C clang 17.79 264,064 660 17.79
Chapel #3 8.71 367,232 494 26.20
C clang #5 9.39 351,232 914 33.96
C clang

Ubuntu clang version 18.1.3

Chapel

chpl version 2.0.0
built with LLVM version 17.0.2
Copyright 2020-2024
Hewlett Packard Enterprise Development LP
Copyright 2004-2019 Cray Inc.