The Computer Language
24.04 Benchmarks Game

Rust versus Intel C fastest performance

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
Intel C #6 2.30 19,852 1582 9.08
Intel C #4 13.35 19,728 1190 13.35
Rust #6 4.00 19,652 1260 15.86
Rust #4 7.10 19,652 1026 27.94
Intel C #5 7.13 19,852 917 28.23
Rust #5 7.88 19,784 1023 30.85
Intel C #2 8.70 19,856 1563 34.12
Intel C #3 34.49 19,724 574 34.49
Intel C 41.65 19,856 514 41.65
Rust #2 18.53 19,780 1198 73.32
n-body
source secs mem gz cpu secs
Intel C #9 2.03 19,728 1639 2.03
Rust #9 2.20 19,660 1881 2.20
Rust #7 3.13 19,660 1759 3.13
Intel C #8 3.67 19,728 1398 3.67
Rust #2 3.92 19,660 1809 3.92
Rust #6 3.95 19,788 1796 3.95
Rust #8 4.51 19,788 1774 4.50
Intel C #7 4.56 19,728 1250 4.56
Intel C #4 4.90 19,856 1496 4.90
Rust #5 5.06 19,788 2224 5.06
Rust #4 5.21 19,660 1810 5.21
Rust 5.51 19,660 1483 5.51
Intel C #5 5.55 19,728 1436 5.55
Rust #3 5.60 19,656 1546 5.60
Intel C 6.16 19,728 1179 6.16
Intel C #6 6.16 19,728 1186 6.16
Intel C #2 6.23 19,728 1270 6.23
Intel C #3 6.43 19,856 1214 6.43
spectral-norm
source secs mem gz cpu secs
Intel C #6 0.39 19,736 1203 1.55
Rust #2 0.72 19,668 1117 2.58
Rust 0.74 19,668 1262 2.60
Intel C 2.67 19,736 390 2.67
Rust #3 0.79 19,796 1060 2.83
Rust #6 0.72 19,668 1132 2.84
Rust #4 0.72 19,796 823 2.85
Rust #7 0.72 19,796 938 2.85
Rust #5 0.72 19,668 1062 2.85
Intel C #8 0.72 19,736 941 2.87
Intel C #5 0.72 19,736 576 2.87
Intel C #7 0.73 19,736 906 2.88
Intel C #4 0.73 19,864 1145 2.88
Intel C #3 0.73 19,864 470 2.88
mandelbrot
source secs mem gz cpu secs
Rust #4 0.96 33,280 1301 3.78
Rust #6 1.07 34,048 1338 4.20
Rust #8 1.06 33,280 770 4.21
Rust #7 1.06 33,280 763 4.21
Rust #5 1.12 33,920 725 4.40
Rust #3 1.14 19,656 1013 4.51
Intel C #9 1.31 35,456 700 5.20
Rust 1.83 39,296 874 7.20
Intel C #7 3.00 35,328 1000 11.89
Intel C #4 3.21 35,328 805 12.77
Intel C 3.25 33,024 828 12.94
Intel C #3 3.31 33,024 769 13.17
Intel C #2 23.89 19,728 412 23.89
Intel C #6   Make Error  
Intel C #8   Bad Output  
pidigits
source secs mem gz cpu secs
Rust #4 0.71 19,660 804 0.71
Intel C #2 0.81 19,728 422 0.81
Intel C 0.88 19,728 459 0.88
Rust 0.88 19,660 1426 0.88
Rust #3 0.88 19,660 1373 0.88
Rust #2 0.88 19,660 1312 0.88
regex-redux
source secs mem gz cpu secs
Rust #6 1.19 153,584 994 1.44
Rust #5 1.28 202,584 777 1.52
Rust 1.30 154,416 811 1.52
Rust #4 1.30 199,540 771 1.54
Rust #3 1.31 202,684 726 1.56
Rust #2 1.34 153,896 707 1.58
Rust #7 0.78 150,272 2464 1.99
Intel C #5 0.89 154,688 1403 2.86
Intel C #2 3.20 103,808 1121 3.20
Intel C #4 1.03 154,672 1237 3.99
Intel C #3 1.83 105,984 1273 4.40
fasta
source secs mem gz cpu secs
Intel C #9 0.87 19,728 1469 0.87
Intel C #5 1.06 19,728 1286 1.06
Intel C #8 1.51 19,856 1299 1.51
Rust #7 0.76 19,664 2533 1.51
Rust #3 2.00 19,656 1235 2.00
Rust #8 0.92 19,784 1952 3.10
Intel C #7 0.84 19,728 2018 3.27
Intel C #2 0.83 19,728 2276 3.27
Rust #2 0.91 19,656 1910 3.29
Rust #5 0.91 19,656 1963 3.30
Rust #4 3.45 123,784 944 3.45
Rust #6 3.48 123,784 959 3.48
Intel C #3 4.07 19,728 825 4.07
Rust 4.52 19,656 1240 4.52
Intel C #4   Make Error  
Intel C   Make Error  
Intel C #6   Bad Output  
k-nucleotide
source secs mem gz cpu secs
Rust #7 2.86 134,084 1585 9.12
Rust #8 3.68 137,580 1549 10.41
Rust #6 2.90 159,464 1697 10.51
Rust #5 3.91 137,764 1745 11.86
Intel C 6.01 130,388 1512 13.22
Rust #2 6.10 139,388 1350 16.32
Rust #9 6.77 135,684 1850 18.07
Rust #4 6.70 137,288 1755 18.12
Rust 21.62 157,080 1086 64.67
reverse-complement
source secs mem gz cpu secs
Intel C #7 0.44 500,148 1899 0.62
Intel C #8 0.46 500,148 1551 0.69
Rust 0.52 498,816 2762 0.83
Rust #2 0.85 995,200 1332 1.50
Rust #3 0.87 995,072 1105 1.58
Intel C #2 1.13 994,688 757 1.64
Intel C #5 2.10 994,560 654 2.10
Intel C #4 3.73 500,864 716 3.73
Intel C #6 1.07 718,556 828 4.24
binary-trees
source secs mem gz cpu secs
Rust #5 1.08 198,528 771 3.82
Rust #2 1.22 199,676 729 4.29
Rust #4 1.29 189,052 765 4.67
Rust #3 1.39 198,860 762 5.04
Intel C #2 1.68 171,264 816 5.32
Intel C #3 1.97 135,168 842 6.03
Rust 2.04 133,120 760 7.21
Intel C 17.09 264,192 660 17.08
Intel C #5 8.85 351,616 914 31.83
Rust

1.76.0
(07dca489a
2024-02-04)
LLVM version: 17.0.6

Intel C

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