reverse-complement benchmark ≈240MB N=25,000,000

Each chart bar shows how many times more Memory, one ↓ reverse-complement program used, compared to the program that used least Memory.

These are not the only programs that could be written. These are not the only compilers and interpreters. These are not the only programming languages.

Column × shows how many times more each program used compared to the benchmark program that used least.

    sortsort sort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0OCaml #3 2.1515,5321314  0% 0% 1% 100%
2.0OCaml 3.5430,9641064  0% 2% 2% 100%
8.0Pascal Free Pascal #2 2.062.06124,812751  1% 1% 0% 100%
8.0C++ g++ #3 1.311.32124,956810  2% 2% 1% 100%
8.1C gcc #4 1.301.30125,088704  1% 1% 0% 100%
8.1C++ g++ #5 25.1825.19125,128646  0% 0% 1% 100%
8.1Ada 2005 GNAT 4.024.03125,448885  2% 0% 1% 100%
8.2C CINT #2 77.3377.34127,432727  0% 0% 0% 100%
8.2Haskell GHC #3 1.211.22127,440999  1% 2% 4% 99%
8.3Ruby #2 10.3810.40129,084255  0% 1% 0% 100%
11Go #3 1.721.72164,092543  0% 1% 2% 99%
11Go #2 2.012.01164,096546  0% 0% 1% 100%
11OCaml #2 4.124.12171,688394  1% 1% 0% 100%
11Racket #2 4.504.51171,8001026  1% 1% 1% 100%
11C# Mono 2.962.97175,5201099  1% 0% 1% 100%
13Fortran Intel #2 8.008.01194,340772  1% 1% 1% 100%
13Ada 2005 GNAT #2 1.531.54200,5523220  1% 1% 1% 99%
14Lisp SBCL 3.203.21212,144896  0% 1% 1% 100%
14C# Mono #3 9.149.15212,308863  1% 1% 1% 100%
16C++ g++ #4 0.980.99245,6922275  3% 1% 0% 99%
16C++ g++ 3.713.72246,924571  1% 1% 1% 100%
16C++ g++ #2 1.291.29246,9401082  1% 2% 2% 99%
16Fortran Intel 0.930.93247,7241013  0% 1% 3% 100%
16Go 2.072.08249,5841243  0% 1% 1% 100%
16C gcc #2 0.740.75250,408741  1% 1% 0% 100%
17Rust 0.600.61257,0041896  0% 2% 2% 100%
17Python 3 #6 4.944.96258,656800  0% 1% 1% 100%
17OCaml #4 1.781.78264,4402064  1% 1% 1% 100%
17Java  #7 2.257.53268,9641640  7% 2% 11% 89%
19JavaScript V8 #3 11.9611.98288,280498  0% 1% 1% 100%
19JavaScript V8 26.0826.10295,512390  0% 0% 1% 100%
19Java  #3 2.542.55301,8841661  1% 1% 0% 100%
20JavaScript V8 #4 7.437.44313,248787  0% 1% 1% 100%
23Perl #3 2.782.79358,204284  3% 1% 1% 100%
24PHP 7.027.03369,044297  0% 1% 1% 100%
24Smalltalk VisualWorks 27.6327.64379,104754  0% 0% 1% 100%
27Scala #4 2.242.24417,588501  2% 1% 0% 100%
27Clojure 5.965.97418,7441044  0% 1% 1% 100%
29PHP #2 7.047.05443,484262  1% 1% 0% 100%
29JavaScript V8 #2 21.3421.37455,032456  0% 1% 1% 100%
29JavaScript V8 #6 105.04105.08456,028359  0% 0% 0% 100%
30Clojure #4 7.567.57462,388997  0% 1% 2% 100%
31Java  #4 2.852.86480,916592  0% 2% 0% 100%
32C gcc 0.840.85496,8841867  0% 4% 3% 100%
33Racket 13.5513.57506,856547  0% 1% 1% 100%
33Scala #8 1.801.80518,336761  1% 1% 3% 100%
33Java  #6 1.691.69519,612745  0% 1% 0% 100%
36Clojure #5 6.556.56560,516727  0% 1% 2% 100%
37Erlang HiPE 20.1420.16574,9241302  1% 1% 1% 100%
40Haskell GHC #2 2.432.44619,016919  1% 0% 4% 100%
41Erlang HiPE #4 34.5534.57630,3241167  0% 1% 0% 100%
50Python 3 #4 6.546.56781,140325  1% 0% 1% 100%
59Python 3 #3 24.5924.62911,484295  0% 1% 0% 100%
63Dart #2 23.1023.12983,180555  0% 1% 1% 100%
63Dart #3 18.8918.90983,992551  0% 1% 1% 100%
64Erlang HiPE #3 48.0848.14996,276624  0% 1% 1% 100%
87Ruby JRuby #2 24.8424.871,344,420255  0% 1% 1% 100%
Go #4 Bad Output874
Lua #3 Failed593
Lua Failed555
Scala #6 Failed519
Scala #5 Failed329
Scala #7 Failed949
"wrong" (different) algorithm / less comparable programs
31Python 3 #5 4.724.73480,296306
33Java  1.561.56520,196476
36JavaScript V8 #5 45.8645.91555,368407
36Clojure #3 7.507.51560,028812
missing benchmark programs
F# Mono No program

 reverse-complement benchmark : Read DNA sequences - write their reverse-complement

You can write your own program for this task and contribute to the benchmarks game by following these general instructions.

More specifically:

diff program output for this 10KB input file (generated with the fasta program N = 1000) with this output file to check your program is correct before contributing.

We are trying to show the performance of various programming language implementations - so we ask that contributed programs not only give the correct result, but also use the same algorithm to calculate that result.

We use the FASTA file generated by the fasta benchmark as input for this benchmark. Note: the file may include both lowercase and uppercase codes.

Each program should

We use these code complements:

code  meaning   complement
A    A                   T
C    C                   G
G    G                   C
T/U  T                   A
M    A or C              K
R    A or G              Y
W    A or T              W
S    C or G              S
Y    C or T              R
K    G or T              M
V    A or C or G         B
H    A or C or T         D
D    A or G or T         H
B    C or G or T         V
N    G or A or T or C    N

"by knowing the sequence of bases of one strand of DNA we immediately know the sequence of the DNA strand which will bind to it, this strand is called the reverse complement"
DNA: Structure and Function

Revised BSD license

  Home   Conclusions   License   Play