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.1C gcc #4 1.421.42126,076704  6% 0% 1% 100%
8.1C++ g++ #3 1.401.41126,340810  1% 4% 1% 100%
8.1Ada 2005 GNAT 3.843.84126,476885  1% 1% 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.51172,1561026  0% 1% 1% 100%
12C++ g++ #5 28.2028.21189,184646  1% 0% 0% 100%
12JavaScript V8 #3 12.6712.69193,192498  1% 1% 1% 100%
13Fortran Intel #2 8.008.01194,340772  1% 1% 1% 100%
13C# Mono 1.671.68195,5601099  4% 0% 1% 99%
13JavaScript V8 28.8628.89198,272390  0% 1% 1% 100%
13Ada 2005 GNAT #2 1.191.20200,5603220  0% 0% 2% 99%
13Lisp SBCL 3.223.22209,500896  1% 0% 1% 100%
14C# Mono #3 5.585.59215,444863  1% 1% 1% 100%
16C++ g++ 3.863.87247,616571  1% 1% 0% 100%
16Fortran Intel 0.930.93247,7241013  0% 1% 3% 100%
16C++ g++ #2 1.161.17248,0601082  1% 0% 3% 99%
16C++ g++ #4 1.001.01248,6282275  1% 1% 2% 100%
16Go 2.072.08249,5841243  0% 1% 1% 100%
16C gcc #2 0.760.76251,444741  3% 0% 0% 100%
17Python 3 #6 5.235.25258,596800  0% 2% 1% 100%
17Rust 1.151.16260,1201985  1% 2% 2% 100%
17OCaml #4 1.781.78264,4402064  1% 1% 1% 100%
17JavaScript V8 #4 7.387.39268,372787  1% 3% 4% 100%
18Java  #7 2.536.66276,2361640  7% 1% 13% 82%
20Java  #3 2.552.55308,3361661  0% 0% 1% 100%
21JavaScript V8 #6 126.50126.73327,248359  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.312.31417,240501  1% 1% 0% 100%
27Clojure 6.156.16424,6561135  0% 1% 1% 100%
29PHP #2 7.047.05443,484262  1% 1% 0% 100%
30Clojure #4 7.297.30468,7441005  1% 0% 1% 100%
31Java  #4 2.902.91485,704592  1% 1% 0% 100%
32C gcc 0.930.93497,5201867  2% 1% 1% 100%
32JavaScript V8 #2 23.9724.00498,736456  1% 1% 2% 100%
33Scala #8 2.012.02517,176761  0% 1% 1% 100%
34Java  #6 1.801.80522,620745  3% 1% 1% 99%
34Racket 13.2513.26531,452547  0% 1% 1% 100%
36Clojure #5 6.686.69564,436727  1% 0% 0% 100%
39Erlang HiPE 20.7920.81599,1721302  0% 0% 1% 100%
39Erlang HiPE #4 36.4436.47601,3841167  1% 0% 0% 100%
40Haskell GHC #2 2.432.44619,016919  1% 0% 4% 100%
50Python 3 #4 6.326.33781,148325  0% 0% 1% 100%
61Erlang HiPE #3 51.1151.18949,932624  0% 1% 1% 100%
64Dart #2 22.5222.54986,692555  1% 0% 0% 100%
64Dart #3 21.5721.59987,496551  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
32Python 3 #5 4.564.57497,300306
34Java  1.691.70522,376476
36Clojure #3 6.997.00566,792812
48JavaScript V8 #5 35.6235.65748,284407
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