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