/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.920.67248,640741  15% 11% 79% 36%
1.3C++ g++ #4 1.220.84245,4562275  29% 33% 49% 35%
1.3C gcc 1.160.85496,9401867  26% 0% 88% 27%
1.3OCaml #3 0.8912,6441314  52% 57% 83% 67%
1.5C++ g++ #2 1.291.02245,1281082  10% 9% 99% 12%
1.6Fortran Intel 1.021.04246,4601013  1% 0% 1% 100%
1.9Ada 2005 GNAT #2 1.641.24197,1243220  42% 1% 26% 64%
2.0Rust 1.331.33248,880804  0% 0% 100% 0%
2.0C gcc #4 1.341.34125,100704  0% 1% 1% 100%
2.0C++ g++ #3 1.341.34124,968810  1% 1% 0% 100%
2.2Haskell GHC #3 1.541.45125,956999  3% 6% 4% 100%
2.4Java  #3 3.161.63296,1361661  77% 24% 39% 58%
2.5OCaml #4 1.661.67127,5802064  0% 1% 1% 100%
2.5Scala #8 2.201.69512,996761  92% 6% 33% 2%
2.6Java  #6 2.011.74513,220745  84% 30% 3% 3%
2.7Go #3 1.821.82159,880543  2% 0% 0% 100%
2.9Go 2.281.93249,1641243  3% 16% 6% 98%
3.1OCaml 2.0625,4481064  6% 26% 66% 61%
3.3Pascal Free Pascal #2 2.172.17122,544751  0% 0% 0% 100%
3.6Scala #4 2.482.41406,492501  2% 2% 98% 5%
3.8Go #2 2.522.52160,120546  0% 100% 0% 0%
4.2C# Mono 2.822.82171,2721099  1% 74% 2% 26%
4.3Haskell GHC #2 3.152.85618,320919  77% 5% 27% 5%
4.6Java  #4 3.143.04478,080592  3% 98% 2% 3%
4.6Perl #3 3.043.05374,472284  0% 1% 1% 100%
4.7Scala #7 5.463.11797,764949  46% 65% 38% 30%
5.9C++ g++ 3.903.90245,220571  1% 1% 100% 0%
6.2Ada 2005 GNAT 4.144.15130,092885  0% 1% 100% 1%
6.5Lisp SBCL 4.304.31219,636896  0% 0% 0% 100%
6.7Racket #2 4.484.48172,5481026  1% 1% 100% 1%
6.7OCaml #2 4.494.50171,972394  0% 16% 84% 0%
9.8Python 3 #4 6.536.55781,144325  0% 1% 0% 100%
11Java  #7 2.707.31264,9121640  28% 28% 18% 45%
11Clojure 15.547.63495,2521044  95% 47% 45% 19%
12PHP #2 7.837.85443,496262  0% 100% 0% 0%
12PHP 7.927.95370,544297  0% 13% 88% 0%
12Fortran Intel #2 8.288.30167,656772  0% 0% 0% 100%
14Clojure #4 17.469.14540,576997  39% 93% 37% 23%
14C# Mono #3 9.209.21255,164863  0% 100% 0% 0%
16Ruby #2 10.6110.62127,848255  0% 0% 100% 1%
18Erlang HiPE 21.6611.71762,6001302  80% 40% 26% 40%
20Racket 13.5813.59506,864547  0% 1% 100% 0%
29Ruby JRuby #2 25.1019.651,166,576255  14% 12% 85% 18%
34Dart #3 22.8022.611,122,456551  49% 5% 46% 2%
37Python 3 #3 24.6224.65921,520295  0% 0% 1% 100%
38C++ g++ #5 25.1825.19170,168646  1% 1% 100% 0%
51Dart #2 34.3434.061,181,176555  47% 2% 30% 23%
55Erlang HiPE #4 45.0536.66689,3681167  77% 22% 9% 17%
88Erlang HiPE #3 61.0558.751,030,104624  4% 0% 1% 99%
Dart Failed443
Scala #6 Failed519
Scala #5 Failed329
"wrong" (different) algorithm / less comparable programs
2.8Java  1.901.88512,576476
7.1Python 3 #5 4.764.77471,320306
14Clojure #3 17.189.07631,388812
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