/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.65248,632741  17% 31% 83% 16%
1.3C++ g++ #4 1.220.84245,4282275  19% 31% 12% 88%
1.3C gcc 1.160.85496,9401867  25% 0% 89% 26%
1.4OCaml #3 0.9012,6001314  62% 51% 67% 78%
1.6Fortran Intel 1.021.04246,4601013  1% 0% 1% 100%
1.7ATS #2 1.081.08122,5961895  3% 1% 5% 99%
1.9Ada 2005 GNAT #2 1.631.24197,3243220  41% 1% 90% 2%
2.1C++ g++ #2 1.331.34244,8081082  2% 0% 0% 100%
2.1C gcc #4 1.341.34125,096704  1% 0% 1% 100%
2.1C++ g++ #3 1.341.35124,956810  0% 0% 2% 100%
2.3Java 7  #3 2.931.52294,7841661  32% 59% 58% 47%
2.6OCaml #4 1.651.66127,5642064  1% 0% 100% 1%
2.6Java 7  #6 1.921.68511,484745  2% 26% 85% 5%
2.6Scala #8 2.191.70489,548761  3% 4% 95% 31%
2.7Haskell GHC #3 1.901.73125,816999  42% 5% 5% 63%
2.9Go #3 1.861.87159,972543  0% 2% 100% 0%
3.2OCaml 2.0625,4321064  26% 12% 55% 69%
3.2Go 2.352.08249,4361243  12% 0% 4% 99%
3.3Go #2 2.162.16160,224546  99% 0% 2% 0%
3.4Pascal Free Pascal #2 2.172.17122,544751  0% 0% 0% 100%
3.5Scala #4 2.322.29405,904501  5% 2% 0% 98%
3.9C# Mono 2.522.52170,8641099  0% 1% 15% 87%
4.4Scala #7 5.122.86703,028949  25% 44% 67% 47%
4.6Haskell GHC #2 3.442.95618,168912  6% 6% 100% 5%
4.6Java 7  #4 3.072.99476,240592  3% 2% 2% 99%
4.7Perl #3 3.043.05374,472284  0% 1% 1% 100%
6.2C++ g++ 4.044.04245,208571  1% 0% 0% 100%
6.4Ada 2005 GNAT 4.124.13123,524885  64% 0% 0% 37%
7.0OCaml #2 4.504.51171,956394  0% 0% 0% 100%
7.0Racket #2 4.524.53174,1321026  0% 0% 100% 0%
7.4Lisp SBCL 4.784.79164,812896  0% 98% 2% 0%
9.5C# Mono #3 6.126.13253,540863  0% 100% 0% 1%
10Python 3 #4 6.526.54601,488325  0% 0% 100% 0%
12Clojure 14.957.72482,2281044  32% 81% 40% 43%
12PHP 7.747.75369,020297  0% 1% 100% 0%
13Fortran Intel #2 8.288.30167,656772  0% 0% 0% 100%
13Clojure #4 16.008.67522,784997  27% 34% 87% 39%
14Java 7  #7 2.398.78263,5321640  20% 58% 45% 23%
16Ruby 2.0 #2 10.1610.17127,452255  0% 0% 1% 100%
18Erlang HiPE 21.6611.71762,6001302  80% 40% 26% 40%
21Racket 13.3913.39506,524547  0% 0% 0% 100%
30Ruby JRuby #2 24.2019.281,026,664255  3% 100% 12% 11%
43C++ g++ #5 27.7827.79151,940646  85% 0% 0% 16%
44Python 3 #3 28.7328.78924,620295  90% 10% 0% 1%
57Erlang HiPE #4 45.0536.66689,3681167  77% 22% 9% 17%
80Dart #2 51.7351.691,075,468555  99% 0% 0% 1%
91Erlang 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 7  1.831.83511,096476
8.0Python 3 #5 5.155.16485,916306
14Clojure #3 15.908.75635,832812
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