The Computer Language
25.02 Benchmarks Game

reverse-complement

These are crowd sourced programs, contributed to the project by an ever-changing self-selected group.

We include both un-optimised programs and heavily optimised programs (look at the gz source code size). We include both single-thread programs and multi-thread programs (look at the cpu secs). We include [pdf] vector parallelism and even hand-written vector instructions. How the programs are written matters!

Always look at the source code.

× source secs mem gz cpu secs
1.0 C gcc #9 0.49 514,159 1551 0.77
1.8 C gcc #6 0.97 693,969 828 1.36
2.0 C gcc #5 1.54 1,020,662 654 1.53
2.1 C gcc #2 1.07 1,021,755 757 1.59
2.1 Rust #2 1.01 1,022,128 1332 1.60
2.2 Rust #3 1.02 1,022,034 1105 1.71
2.3 Julia #7 1.75 1,128,034 531 1.81
2.8 Julia #9 2.08 1,330,057 456 2.14
3.0 Go #2 2.22 822,211 614 2.32
3.4 Go #3 2.50 821,985 609 2.60
3.6 Chapel #9 1.00 1,087,742 1260 2.81
4.1 Chapel #5 1.83 1,442,632 554 3.13
4.1 Chapel #3 1.84 1,669,767 709 3.16
4.3 C# naot 3.37 637,997 1130 3.34
4.3 Intel Fortran 3.35 1,012,519 1026 3.35
4.4 Go #6 1.93 1,277,608 1340 3.43
4.8 C# naot #5 2.74 1,027,035 1620 3.73
5.0 Free Pascal #2 3.83 538,989 773 3.83
5.0 Ada 2012 GNAT #2 3.02 845,664 3285 3.85
5.3 C# naot #7 1.56 774,136 1312 4.10
5.5 C# naot #6 1.81 1,029,992 1627 4.23
6.1 Java naot #6 4.05 2,063,376 760 4.72
6.4 Python 3 #3 4.96 523,801 803 4.92
7.1 Lisp SBCL 5.51 1,538,748 911 5.49
7.5 Perl #4 5.80 1,026,572 268 5.78
7.5 OCaml #3 2.28 1,518,805 1361 5.78
7.8 Java naot #5 6.03 1,100,202 1115 6.02
8.5 C++g++ 6.55 1,006,805 599 6.55
8.7 Java naot #4 6.75 1,914,102 656 6.74
8.8 Perl #3 6.84 1,535,848 295 6.82
9.6 Python 3 #5 4.18 2,418,156 960 7.44
12 OCaml #2 9.29 933,937 426 9.29
13 Python 3 #2 10.09 1,837,285 440 10.05
13 PHP 10.35 1,531,154 323 10.32
13 Python 3 10.43 2,040,713 484 10.39
14 Python 3 #6 7.59 2,795,930 821 11.03
15 Ruby #4 6.01 3,079,053 608 11.59
16 Dart aot #5 8.94 2,048,598 942 12.09
16 PHP #2 12.31 1,836,716 288 12.28
16 PHP #3 8.29 1,821,659 452 12.58
17 C# naot #3 8.76 1,236,947 934 13.24
17 Python 3 #4 13.47 4,109,324 343 13.43
18 Ruby #5 13.63 1,647,829 301 13.59
18 Ada 2012 GNAT 14.15 543,805 943 14.14
22 Ruby #3 8.46 4,884,902 490 16.64
25 Ruby #2 19.54 519,827 272 19.50
26 Dart aot #8 19.12 1,029,022 651 20.11
33 Ruby 13.29 6,528,086 521 25.84
39 Julia #2 29.38 2,259,771 464 29.83
49 C++ g++ #5 37.66 792,846 704 37.65
52 Lua #2 40.51 2,724,557 560 40.48
55 Racket 42.51 2,151,363 560 42.45
55 Lua #5 42.76 2,227,057 758 42.74
55 F# 41.59 3,088,159 603 42.79
59 Intel Fortran #2 45.22 790,307 778 45.21
64 Lua #4 49.30 1,057,935 600 49.28
84 Dart aot #3 58.14 6,563,373 571 64.53
129 Dart aot #2 91.10 6,518,862 575 99.40
198 Pharo Smalltalk #2 151.89 1,164,440 724 152.85
732 Pharo Smalltalk 9 min 2,728,526 907 9 min
  Erlang 29 min 4,154,388 1309 32 min
C# naot #9 Bad Output
C++ g++ #6 Bad Output
C++ g++ #3 Bad Output
Dart aot #4 Bad Output
Erlang #4 Timed Out
Erlang #3 Timed Out
F# #4 Timed Out
F# #5 Timed Out
Go #5 Bad Output
Go Empty
Java naot #3 Bad Output
Java naot #7 Bad Output
Node.js #7 Bad Output
Lisp SBCL #2 Timed Out
 
 
  * possible hand-written vector instructions or "unsafe"
 
× source secs mem gz cpu secs
0.8 * C gcc #7 0.44 514,208 1899 0.59
1.0 * C++ g++ #2 0.76 514,101 2099 0.75
1.1 * Rust 0.55 512,963 2762 0.85
3.1 * Swift 1.97 825,594 1293 2.40
4.1 * Haskell GHC #4 3.12 523,321 1047 3.20
4.8 * C gcc #4 3.70 514,077 716 3.70
6.7 * OCaml 2.27 1,519,079 1372 5.14
8.5 * Haskell GHC #2 6.43 3,140,076 998 6.54
12 * Racket #2 9.12 854,643 1038 9.07
21 * Node.js #2 15.52 764,158 1228 16.18