/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 #3 2.1512,8801314  0% 0% 1% 100%
 OCaml 3.1225,7041064  0% 0% 0% 100%
 C gcc #2 0.820.83248,640741  0% 0% 2% 100%
 Fortran Intel 1.031.04246,4641013  0% 0% 3% 100%
 C++ g++ #4 1.061.07245,4082275  0% 0% 2% 99%
 C gcc 1.071.08496,9241867  0% 1% 2% 100%
 Haskell GHC #3 1.221.23125,896999  2% 1% 2% 100%
 C++ g++ #2 1.261.26244,8721082  0% 0% 1% 100%
 Rust 1.321.33248,884804  2% 1% 1% 100%
 C gcc #4 1.331.33125,096704  0% 2% 2% 100%
 C++ g++ #3 1.331.34124,968810  0% 1% 0% 99%
 Ada 2005 GNAT #2 1.621.64197,1203220  0% 1% 1% 99%
 OCaml #4 1.661.66127,5842064  0% 1% 1% 100%
 Go #3 1.821.82159,884543  0% 0% 1% 100%
 Java  #6 1.961.97513,448745  1% 2% 0% 100%
 Scala #8 2.122.14453,280761  1% 0% 1% 100%
 Pascal Free Pascal #2 2.162.18128,584751  1% 1% 0% 100%
 Go 2.182.18249,2001243  0% 0% 0% 100%
 Java  #7 2.388.24265,3241640  37% 48% 1% 95%
 Scala #4 2.462.47407,288501  0% 1% 1% 100%
 Go #2 2.512.52160,132546  1% 2% 1% 100%
 Haskell GHC #2 2.612.62618,656919  1% 1% 1% 100%
 C# Mono 2.832.83171,2681099  1% 1% 1% 100%
 Java  #3 2.842.85295,5761661  0% 2% 2% 100%
 Perl #3 3.023.03374,264284  1% 0% 0% 100%
 Java  #4 3.113.12476,804592  1% 1% 0% 100%
 C++ g++ 3.943.95245,220571  0% 1% 1% 100%
 Ada 2005 GNAT 4.154.16128,244885  0% 1% 1% 100%
 Lisp SBCL 4.304.30224,968896  0% 1% 1% 100%
 OCaml #2 4.504.51171,972394  0% 0% 0% 100%
 Racket #2 4.504.51171,8001026  1% 1% 1% 100%
 Scala #7 4.804.82797,196949  0% 1% 1% 100%
 Python 3 #4 6.546.56781,140325  1% 0% 1% 100%
 PHP #2 7.867.88443,500262  0% 0% 0% 100%
 PHP 7.967.98369,064297  0% 1% 1% 100%
 Fortran Intel #2 8.518.53176,104772  0% 1% 1% 100%
 JavaScript V8 #4 9.179.18240,648787  0% 0% 1% 100%
 C# Mono #3 9.239.24253,776863  0% 0% 1% 100%
 Ruby #2 10.6310.64127,856255  0% 1% 0% 100%
 JavaScript V8 #3 12.2412.26183,000498  0% 0% 1% 100%
 Racket 13.5513.57506,856547  0% 1% 1% 100%
 Clojure 15.1015.12494,8281044  0% 1% 0% 100%
 Clojure #4 16.9016.92533,616997  0% 1% 1% 100%
 Erlang HiPE 21.2421.26563,3481302  0% 0% 0% 100%
 Lua 22.4922.51724,576555  0% 0% 0% 100%
 Dart #3 22.7222.751,102,020551  1% 1% 0% 100%
 JavaScript V8 #2 23.3823.41324,524456  0% 1% 1% 100%
 Python 3 #3 24.5924.62911,484295  0% 1% 0% 100%
 Ruby JRuby #2 25.2725.301,189,288255  0% 1% 0% 100%
 JavaScript V8 25.5925.61182,832390  0% 1% 1% 100%
 C++ g++ #5 27.2827.30174,388646  1% 1% 1% 100%
 Smalltalk VisualWorks 27.3927.42373,712754  0% 1% 1% 100%
 Dart #2 34.4134.451,101,124555  1% 1% 0% 100%
 Erlang HiPE #4 34.5734.60625,9481167  0% 1% 1% 100%
 Erlang HiPE #3 50.9350.99861,592624  0% 0% 0% 100%
 C CINT #2 77.3377.34127,432727  0% 0% 0% 100%
Dart Failed443
Lua #3 Failed593
Scala #6 Failed519
Scala #5 Failed329
"wrong" (different) algorithm / less comparable programs
 Java  1.871.88512,512476
 Python 3 #5 4.724.73480,296306
 Clojure #3 16.4416.46637,516812
 JavaScript V8 #5 52.3252.38522,820407
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