The Computer Language
24.11 Benchmarks Game

C clang versus Lisp SBCL 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.24 19,772 1582 8.86
* C clang #4 13.37 19,772 1190 13.37
Lisp SBCL #5 30.84 52,736 689 30.83
C clang #5 8.09 19,772 917 31.94
* C clang #2 8.67 19,772 1563 34.02
C clang #3 34.16 19,772 574 34.15
Lisp SBCL #3 36.25 32,256 833 36.24
C clang #8 36.39 19,492 483 36.38
C clang 36.51 19,772 514 36.50
Lisp SBCL #4 9.39 32,256 1531 36.91
Lisp SBCL #2 48.01 23,040 525 48.01
n-body
source secs mem gz cpu secs
* C clang #9 2.20 19,772 1639 2.20
* C clang #5 4.86 19,772 1436 4.86
C clang #6 5.16 19,772 1186 5.16
C clang 5.37 19,772 1179 5.37
C clang #2 5.42 19,772 1270 5.42
* C clang #4 5.60 19,772 1398 5.59
C clang #8 5.72 19,492 1193 5.72
C clang #3 6.12 19,772 1214 6.12
C clang #7 6.77 19,772 1250 6.77
Lisp SBCL #2 7.80 23,168 1408 7.80
Lisp SBCL 9.25 23,168 1373 9.25
spectral-norm
source secs mem gz cpu secs
* C clang #6 0.38 19,772 1203 1.52
* C clang #4 0.72 19,772 1145 2.86
* C clang #2 0.72 19,772 941 2.87
* C clang #5 0.72 19,772 576 2.88
Lisp SBCL #6 5.33 19,680 512 5.33
Lisp SBCL 5.33 21,376 639 5.33
C clang #8 5.40 19,772 389 5.40
Lisp SBCL #3 1.44 19,680 893 5.64
Lisp SBCL #9 1.45 19,512 799 5.64
Lisp SBCL #2 1.44 19,680 920 5.64
Lisp SBCL #7 1.46 19,680 769 5.64
C clang #3 1.46 19,772 470 5.77
* C clang #7 1.82 19,772 906 7.24
mandelbrot
source secs mem gz cpu secs
C clang #9 1.22 34,332 700 4.85
C clang #5 1.53 34,864 788 6.09
* C clang #4 3.47 34,328 805 13.82
* C clang 3.49 33,172 828 13.93
* C clang #7 3.53 34,216 1000 14.00
* C clang #3 3.55 33,108 769 14.15
Lisp SBCL #4 4.18 55,028 2453 16.65
C clang #8 25.27 19,496 412 25.27
Lisp SBCL #3 9.79 54,784 900 26.14
* C clang #6   Make Error  
Lisp SBCL   Bad Output  
fasta
source secs mem gz cpu secs
C clang #3 0.78 19,772 1469 0.78
C clang #5 1.20 19,772 1286 1.20
C clang #2 2.43 19,616 1299 2.43
C clang #6 1.03 19,772 1936 3.03
C clang #7 0.82 19,772 2276 3.27
C clang 3.46 19,772 1213 3.46
Lisp SBCL #6 4.48 19,680 1763 4.48
Lisp SBCL #3 5.24 22,912 1592 5.24
C clang #8 8.02 19,956 839 8.02
Lisp SBCL #2 8.85 23,296 1628 8.84
Lisp SBCL 9.02 26,112 1430 9.02
C clang #4   Make Error  
k-nucleotide
source secs mem gz cpu secs
C clang 6.30 129,228 1512 13.92
Lisp SBCL #4 15.67 160,384 2292 15.67
Lisp SBCL #5 15.83 160,512 2323 15.83
Lisp SBCL #6 8.76 518,912 2485 31.45
Lisp SBCL 10.77 570,368 2431 33.53
Lisp SBCL #2 44.40 511,488 1291 44.39
Lisp SBCL #3 45.19 511,488 1297 45.18
reverse-complement
source secs mem gz cpu secs
* C clang #7 0.45 499,996 1899 0.63
C clang #9 0.46 499,976 1551 0.70
C clang #2 1.16 994,536 757 1.69
C clang #5 2.08 994,108 654 2.07
* C clang #4 3.74 500,452 716 3.74
C clang #6 1.03 703,416 828 4.07
Lisp SBCL 5.46 1,494,784 911 5.46
Lisp SBCL #2   Failed  
binary-trees
source secs mem gz cpu secs
C clang #2 1.66 170,236 816 5.36
C clang #3 1.89 134,272 842 5.88
Lisp SBCL #3 3.00 660,620 938 7.41
Lisp SBCL 9.57 643,680 595 9.57
C clang 17.79 264,064 660 17.79
C clang #8 19.63 285,536 607 19.62
C clang #5 9.25 351,328 914 33.65
pidigits
source secs mem gz cpu secs
C clang #2 0.74 19,772 422 0.74
C clang 0.74 19,772 459 0.74
Lisp SBCL #3 3.32 785,792 499 3.32
Lisp SBCL #4 3.33 793,088 495 3.33
Lisp SBCL #2 5.95 811,008 655 5.95
regex-redux
source secs mem gz cpu secs
C clang #5 0.82 154,568 1403 2.82
C clang #2 3.22 103,364 1121 3.22
C clang #4 0.98 154,488 1237 3.82
C clang #3 1.75 105,848 1273 4.31
Lisp SBCL #4 14.02 1,214,164 1977 29.73
C clang

Ubuntu clang version 18.1.8 (11)

Lisp SBCL

SBCL 2.4.8