/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.

     sortsortsort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 OCaml 1.7262,7361064  3% 11% 78% 61%
 OCaml #3 0.8131,0521314  49% 42% 48% 75%
 C gcc #2 0.800.56248,716741  16% 20% 44% 73%
 ATS #2 0.860.87122,6761895  1% 99% 0% 1%
 Ada 2005 GNAT #2 0.940.79197,3763220  82% 0% 0% 36%
 C gcc 1.010.71394,5721867  28% 0% 86% 30%
 C++ g++ #2 1.041.05245,0081082  0% 0% 1% 100%
 Go 1.060.96249,9321243  0% 19% 63% 27%
 C gcc #4 1.121.13125,176704  0% 0% 1% 100%
 C++ g++ #3 1.131.14125,164810  1% 0% 3% 100%
 Fortran Intel 1.161.17246,4881013  0% 0% 100% 1%
 C++ g++ #4 1.220.77245,6922275  12% 55% 49% 46%
 Go #2 1.311.32160,692546  1% 98% 0% 2%
 Go #3 1.441.45160,424543  1% 100% 0% 0%
 OCaml #4 1.551.56129,0322064  1% 1% 100% 10%
 Haskell GHC #3 1.781.49126,196999  80% 28% 6% 9%
 Java 7  #6 1.811.55515,020745  2% 2% 81% 35%
 Scala #8 1.971.52439,420761  4% 3% 92% 35%
 Pascal Free Pascal #2 2.082.08131,492751  0% 0% 100% 1%
 Java 7  #7 2.1210.39266,5121640  2% 73% 67% 3%
 Lisp SBCL 2.352.36298,944896  1% 1% 0% 100%
 C# Mono 2.472.48173,6721099  1% 0% 99% 1%
 Scala #4 2.482.42356,812501  1% 2% 2% 99%
 Java 7  #4 2.502.44356,856592  4% 2% 98% 2%
 Ada 2005 GNAT 2.762.77123,788885  1% 0% 100% 0%
 Java 7  #3 2.791.31298,4041661  61% 77% 40% 39%
 C++ g++ 2.802.80245,416571  0% 0% 0% 100%
 Perl #3 2.902.90374,704284  0% 0% 0% 100%
 Haskell GHC #2 3.432.79738,756912  73% 34% 7% 8%
 Racket #2 4.354.35170,4761026  0% 99% 0% 1%
 Clojure 4.633.49336,6641044  28% 80% 9% 17%
 Scala #7 4.892.53714,056949  32% 52% 48% 65%
 OCaml #2 5.345.36211,492394  0% 0% 1% 100%
 Python 3 #4 5.375.38679,776325  0% 0% 100% 0%
 Clojure #4 5.494.26330,124997  15% 97% 7% 12%
 Fortran Intel #2 6.476.48174,276772  0% 0% 0% 100%
 PHP 6.626.65369,740297  0% 0% 0% 100%
 C# Mono #3 8.277.50282,860863  6% 3% 3% 98%
 Ruby 2.0 #2 9.219.22128,284255  0% 62% 38% 0%
 Racket 13.8313.84597,000547  0% 100% 0% 0%
 C++ g++ #5 18.6218.63163,772646  0% 0% 0% 100%
 Erlang 18.969.61922,5081302  63% 62% 39% 34%
 Erlang HiPE 19.939.98975,1241302  32% 33% 57% 80%
 Python 3 #3 22.4622.48988,436295  0% 55% 46% 0%
 Ruby JRuby #2 24.6519.741,312,704255  43% 59% 12% 11%
 Erlang HiPE #4 42.5534.03776,8601167  79% 26% 12% 8%
 Erlang #4 46.5936.70662,4201167  94% 11% 12% 10%
 Dart #2 53.8853.901,874,956555  30% 70% 0% 0%
 Erlang HiPE #3 57.2054.451,537,668624  1% 99% 9% 1%
 Erlang #3 69.7667.791,150,856624  52% 1% 0% 50%
Dart Failed443
Scala #6 Failed519
Scala #5 Failed329
"wrong" (different) algorithm / less comparable programs
 Java 7  1.721.73514,088476
 Python 3 #5 4.184.20477,428306
 Clojure #3 4.933.98558,496812
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