The Computer Language
24.04 Benchmarks Game

reverse-complement

First a few simple programs.

Then optimisations, multicore parallelism, [pdf] vector parallelism.

Last hand-written vector instructions and "unsafe" programs.

  source secs mem gz    
  C gcc #6 0.96 703,064 828    
  Dart jit #5 4.89 2,144,056 942    
  Perl #3 6.55 1,495,204 295    
 
 
 
× source secs mem gz cpu secs cpu load
1.0 C gcc #8 0.50 499,872 1551 0.86 28% 26% 94% 32%
1.7 Rust #2 0.85 995,200 1332 1.50 25% 58% 67% 26%
1.7 Rust #3 0.87 995,072 1105 1.58 81% 46% 27% 27%
1.9 Chapel #8 0.95 1,057,024 1260 2.74 90% 63% 64% 72%
1.9 C gcc #6 0.96 703,064 828 1.37 19% 100% 0% 25%
2.1 C gcc #2 1.05 994,432 757 1.55 13% 18% 30% 86%
3.0 C gcc #5 1.50 994,176 654 1.50 0% 3% 100% 0%
3.1 C# .NET #7 1.55 935,720 1312 4.20 80% 54% 85% 55%
3.2 Julia #8 1.58 1,039,672 531 1.70 1% 7% 100% 3%
3.2 C# .NET #6 1.60 1,027,884 1627 3.85 43% 77% 30% 92%
3.4 Chapel #3 1.68 1,618,560 709 3.23 94% 32% 31% 39%
3.6 Chapel #5 1.79 1,884,928 554 3.30 94% 28% 29% 33%
3.7 Julia #9 1.83 1,038,224 456 1.95 6% 1% 2% 100%
3.7 Go #6 1.84 1,249,840 1340 3.30 66% 25% 45% 45%
4.4 Go #2 2.21 802,176 614 2.30 16% 85% 5% 0%
4.5 Ada 2012 GNAT #2 2.26 821,912 3285 2.58 74% 0% 39% 0%
4.6 OCaml #3 2.28 19,816 1361 6.06 71% 67% 62% 63%
4.9 Go #3 2.47 802,048 609 2.56 82% 4% 6% 12%
5.3 C# .NET #5 2.63 1,026,424 1620 3.63 29% 18% 1% 90%
5.9 C# .NET 2.97 798,068 1130 3.12 3% 2% 57% 44%
6.4 C++ g++ #6 3.20 1,517,660 1827 4.22 21% 14% 30% 67%
6.7 Java  #6 3.33 2,031,460 760 3.96 38% 1% 0% 79%
7.5 Free Pascal #2 3.77 525,048 773 3.77 0% 0% 1% 100%
8.1 Python 3 #5 4.07 1,500,240 960 7.41 38% 89% 54% 1%
8.3 Classic Fortran 4.15 986,304 1026 4.14 0% 0% 0% 100%
9.5 Java #5 4.73 1,096,344 1115 4.86 2% 89% 4% 8%
10 Python 3 #3 5.18 509,108 803 5.18 0% 99% 0% 0%
11 Lisp SBCL 5.35 1,517,184 911 5.34 0% 100% 0% 0%
11 Java #4 5.57 1,889,928 656 5.68 1% 97% 2% 0%
11 Perl #4 5.65 998,596 268 5.65 0% 0% 0% 100%
13 Perl #3 6.55 1,495,204 295 6.55 1% 0% 0% 100%
13 C++ g++ 6.56 980,060 599 6.56 100% 0% 0% 0%
14 Ruby yjit #4 6.88 2,510,956 608 12.51 12% 36% 91% 43%
14 C# .NET #3 7.24 1,572,432 934 11.37 53% 21% 65% 19%
15 PHP #3 7.59 536,536 452 11.93 23% 30% 51% 51%
16 Python 3 #6 7.86 2,484,084 821 11.49 99% 20% 0% 28%
19 OCaml #2 9.26 888,064 426 9.26 0% 100% 0% 0%
19 Dart #5 9.27 1,994,704 942 12.38 47% 27% 26% 32%
19 Ruby yjit #3 9.57 4,232,604 490 17.72 35% 49% 68% 35%
20 PHP 9.76 1,489,428 323 9.76 0% 100% 1% 0%
21 Python 3 #2 10.46 1,788,876 440 10.46 0% 1% 0% 100%
21 Python 3 10.69 1,987,304 484 10.69 0% 0% 100% 0%
22 Ruby yjit #5 10.77 1,624,300 301 10.76 100% 0% 0% 0%
23 PHP #2 11.67 1,787,276 288 11.67 0% 0% 100% 0%
25 Ada 2012 GNAT 12.53 528,356 943 12.53 0% 0% 0% 100%
28 Python 3 #4 13.91 4,003,712 343 13.91 0% 100% 0% 0%
36 Dart 18.00 1,001,052 651 18.86 1% 2% 2% 99%
37 Ruby yjit 18.75 5,147,124 521 36.24 4% 36% 99% 55%
46 Java #7 23.06 1,036,296 1654 6.31 4% 6% 13% 4%
48 Matz's Ruby #2 23.82 755,060 264 23.82 100% 2% 3% 1%
49 Ruby yjit #2 24.46 1,001,852 272 24.46 100% 0% 0% 0%
70 C++ g++ #5 35.10 771,556 704 35.10 0% 100% 0% 0%
71 Julia #2 35.46 1,718,176 464 35.82 0% 0% 99% 1%
76 F# .NET 37.91 1,964,820 603 39.29 3% 47% 18% 34%
81 Lua #2 40.39 2,654,604 560 40.39 0% 100% 0% 0%
82 Racket 40.99 2,047,504 560 40.99 0% 0% 100% 0%
82 Classic Fortran #2 41.23 769,748 778 41.23 0% 0% 0% 100%
83 Lua #5 41.27 2,169,636 725 41.26 0% 100% 0% 0%
98 Lua #4 49.05 1,030,016 600 49.04 0% 0% 100% 0%
122 Dart #3 60.93 6,340,156 571 62.93 2% 95% 3% 2%
202 Dart #2 100.97 6,336,040 575 104.01 96% 2% 2% 1%
  Erlang 29 min 2,028,908 1309 35 min 25% 33% 32% 28%
C++ g++ #3 Bad Output
Dart #4 Bad Output
Erlang #4 Timed Out
Erlang #3 Timed Out
F# .NET #4 Timed Out
F# .NET #5 Timed Out
Go #5 Bad Output
Go Failed
Java #3 Bad Output
Java #8 Bad Output
Node.js #7 Bad Output
Lisp SBCL #2 Failed
Matz's Ruby Failed
Matz's Ruby #5 Failed
Matz's Ruby #3 Failed
Matz's Ruby #4 Failed
VW Smalltalk Bad Output
 
 
  hand-written vector instructions | "unsafe"
 
× source secs mem gz cpu secs cpu load
0.9 C gcc #7 0.43 499,872 1899 0.58 14% 14% 100% 16%
1.0 Rust 0.52 498,816 2762 0.83 100% 19% 23% 19%
1.1 C# .NET #8 0.56 730,092 2641 1.32 76% 69% 45% 49%
1.4 C++ g++ #2 0.70 499,840 2099 0.70 0% 2% 0% 100%
3.8 Swift 1.88 796,840 1293 2.30 77% 0% 42% 5%
4.5 OCaml 2.23 19,816 1372 5.42 55% 59% 65% 61%
7.3 C gcc #4 3.66 500,480 716 3.66 0% 100% 0% 2%
7.5 Haskell GHC #4 3.76 505,600 1047 3.82 1% 0% 67% 32%
14 Haskell GHC #2 6.81 3,812,096 998 6.90 14% 1% 78% 7%
18 Racket #2 8.99 783,600 1038 8.98 0% 49% 0% 50%
32 Node.js #2 15.89 717,660 1228 16.53 2% 2% 50% 49%