/mobile Handheld Friendly website

 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.1512,8401314  0% 1% 1% 100%
2.0OCaml 3.0925,6721064  1% 1% 1% 100%
9.5ATS #2 1.071.08122,5961895  0% 1% 0% 100%
9.6Ada 2005 GNAT 4.204.21123,524885  0% 0% 0% 100%
9.7C++ g++ #3 1.351.36124,960810  0% 1% 1% 99%
9.7C gcc #4 1.331.34125,092704  0% 1% 1% 100%
9.8Haskell GHC #3 1.541.55125,748999  0% 1% 0% 100%
10C CINT #2 77.3377.34127,432727  0% 0% 0% 100%
10Ruby 2.0 #2 10.1710.18127,452255  0% 0% 0% 100%
10OCaml #4 1.651.66127,5682064  0% 1% 1% 100%
10Pascal Free Pascal #2 2.162.18128,584751  1% 1% 0% 100%
12Go #3 1.861.86159,972543  3% 1% 0% 99%
12Go #2 2.192.20160,224546  0% 0% 0% 100%
13C# Mono 2.672.67170,4361099  0% 0% 1% 100%
13OCaml #2 4.504.51171,960394  0% 1% 0% 100%
14Racket #2 4.514.51174,6001026  0% 0% 1% 100%
14Lisp SBCL 4.794.80175,468896  0% 0% 0% 100%
14Fortran Intel #2 8.518.53176,104772  0% 1% 1% 100%
15C++ g++ #5 25.1425.15187,316646  0% 0% 0% 100%
15JavaScript V8 #3 13.1113.12193,164498  0% 0% 0% 100%
15Ada 2005 GNAT #2 1.611.63197,1043220  0% 1% 1% 99%
15JavaScript V8 25.1225.15198,000390  0% 0% 0% 100%
18C# Mono #3 9.739.75236,368863  0% 0% 0% 100%
19C++ g++ #2 1.331.34244,8081082  0% 0% 1% 99%
19C++ g++ 4.034.04245,208571  1% 0% 1% 100%
19C++ g++ #4 1.061.07245,3882275  0% 1% 0% 100%
19Fortran Intel 1.031.04246,4641013  0% 0% 3% 100%
19C gcc #2 0.820.83248,636741  0% 1% 2% 100%
19Go 2.322.32249,4041243  0% 1% 0% 100%
21Java 7  #7 2.047.48263,5361640  1% 34% 14% 99%
23Java 7  #3 2.752.77294,4721661  2% 0% 1% 100%
25JavaScript V8 #2 20.6620.68324,964456  0% 0% 0% 100%
29PHP 7.737.78369,020297  0% 1% 0% 100%
29Smalltalk VisualWorks 27.3927.42373,712754  0% 1% 1% 100%
29Perl #3 3.023.03374,264284  1% 0% 0% 100%
32Scala #4 2.382.40405,876501  1% 0% 0% 100%
37Java 7  #4 3.063.08475,316592  1% 0% 1% 100%
38Clojure 14.4014.42484,1241044  0% 0% 0% 100%
39C gcc 1.071.08496,9401867  0% 0% 2% 100%
39Racket 13.4113.43506,524547  0% 0% 1% 100%
40Scala #8 2.142.17509,016761  0% 0% 0% 100%
40Java 7  #6 1.881.92511,484745  2% 1% 3% 100%
41Clojure #4 15.6415.66530,912997  0% 0% 0% 100%
44Erlang HiPE 21.2421.26563,3481302  0% 0% 0% 100%
48Python 3 #4 6.506.51616,588325  0% 0% 0% 100%
48Haskell GHC #2 2.492.52618,492912  0% 2% 1% 100%
49Erlang HiPE #4 34.5734.60625,9481167  0% 1% 1% 100%
54Scala #7 4.454.49692,964949  1% 0% 0% 100%
56Lua 22.4922.51724,576555  0% 0% 0% 100%
67Erlang HiPE #3 50.9350.99861,592624  0% 0% 0% 100%
72Python 3 #3 28.2528.27926,204295  0% 0% 0% 100%
81Ruby JRuby #2 23.7923.811,035,904255  0% 0% 0% 100%
84Dart #2 51.5251.571,074,496555  1% 1% 1% 100%
Dart Failed443
Lua #3 Failed593
Scala #6 Failed519
Scala #5 Failed329
"wrong" (different) algorithm / less comparable programs
 JavaScript V8 #4 Bad Output  813
37Python 3 #5 5.185.21469,288306
40Java 7  1.801.83511,052476
50Clojure #3 15.4815.49636,296812
missing benchmark programs
F# Mono No program

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

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