/mobile Handheld Friendly website

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

Each chart bar shows how many times slower, one ↓ reverse-complement program was, compared to the fastest program.

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.

    sort sortsort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0C gcc #2 0.700.71248,716741  1% 0% 3% 100%
1.2ATS #2 0.860.87122,6761895  0% 0% 0% 100%
1.2C++ g++ #4 0.880.88232,3962275  0% 4% 0% 99%
1.3C gcc 0.900.91493,8401867  2% 0% 1% 100%
1.3Ada 2005 GNAT #2 0.930.95197,6523220  0% 1% 0% 99%
1.4Go 1.001.01249,9281243  0% 1% 0% 100%
1.5C++ g++ #2 1.051.06245,0041082  0% 0% 2% 100%
1.6C gcc #4 1.121.12125,172704  0% 0% 2% 100%
1.6C++ g++ #3 1.131.14125,168810  0% 0% 1% 100%
1.7Fortran Intel 1.161.17153,5601013  3% 1% 2% 100%
1.8Haskell GHC #3 1.251.26126,096999  1% 1% 0% 100%
1.9Go #2 1.321.32160,692546  0% 2% 0% 100%
2.1Go #3 1.461.46160,424543  0% 1% 2% 100%
2.2OCaml #3 1.5931,2721314  1% 0% 3% 100%
2.4OCaml #4 1.541.68135,0962064  0% 1% 1% 100%
2.6Java 7  #6 1.791.83514,504745  0% 1% 0% 99%
2.7Scala #8 1.911.94441,532761  1% 2% 1% 100%
2.9Pascal Free Pascal #2 2.072.08131,756751  0% 1% 0% 100%
3.2C# Mono 2.242.24173,5761099  0% 0% 2% 100%
3.3Lisp SBCL 2.352.36298,944896  1% 0% 1% 100%
3.3Scala #4 2.322.36409,444501  0% 1% 0% 100%
3.3Haskell GHC #2 2.342.36618,856912  0% 2% 0% 100%
3.5OCaml 2.4862,7361064  0% 0% 0% 100%
3.6Java 7  #4 2.492.52473,352592  0% 0% 1% 100%
3.7Java 7  #3 2.642.66298,0401661  0% 0% 0% 100%
3.9Ada 2005 GNAT 2.752.76123,788885  0% 0% 0% 100%
4.0C++ g++ 2.792.80245,416571  0% 0% 0% 100%
4.1Perl #3 2.902.91374,548284  0% 0% 0% 100%
5.5Scala #7 3.823.89807,796949  1% 1% 0% 100%
6.1Clojure 4.294.30360,0201044  0% 0% 0% 100%
6.2Racket #2 4.364.36170,4801026  0% 0% 0% 100%
7.5Clojure #4 5.305.31401,372997  0% 0% 0% 100%
7.6OCaml #2 5.355.37211,496394  0% 1% 0% 100%
7.6Python 3 #4 5.385.40675,272325  0% 0% 0% 100%
9.2Fortran Intel #2 6.486.49165,828772  0% 0% 0% 100%
9.3PHP 6.576.60369,740297  0% 0% 0% 100%
11C# Mono #3 7.577.59282,868863  0% 0% 0% 100%
13Java 7  #7 1.848.88266,4881640  9% 69% 17% 71%
13Ruby 2.0 #2 9.039.04128,252255  0% 0% 0% 100%
18JavaScript V8 #3 13.0413.06451,328498  0% 0% 0% 100%
20Racket 13.8813.91597,020547  0% 0% 0% 100%
26Lua 18.3418.37796,612555  0% 0% 0% 100%
26C++ g++ #5 18.6018.61195,716646  0% 0% 0% 100%
27JavaScript V8 #2 18.7818.81583,720456  0% 0% 0% 100%
27Erlang HiPE 19.2019.23632,6161302  0% 0% 0% 100%
32JavaScript V8 22.4222.46508,664390  0% 0% 0% 100%
32Python 3 #3 22.9322.95955,436295  0% 0% 0% 100%
34Ruby JRuby #2 24.3624.441,036,344255  0% 0% 0% 100%
44Smalltalk VisualWorks 31.1031.13331,836754  0% 0% 0% 100%
48Erlang HiPE #4 34.1934.22596,8161167  0% 0% 0% 100%
69Erlang HiPE #3 48.6648.741,307,344624  0% 0% 0% 100%
76Dart #2 53.8053.871,874,704555  0% 0% 0% 100%
Dart Failed443
Lua #3 Failed593
Scala #6 Failed519
Scala #5 Failed329
"wrong" (different) algorithm / less comparable programs
 JavaScript V8 #4 Bad Output  813
2.5Java 7  1.711.75513,640476
5.9Python 3 #5 4.154.16486,936306
6.6Clojure #3 4.704.71555,008812
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