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

Each chart bar shows how many times more Code, one ↓ reverse-complement program used, compared to the program that used least Code.

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
1.0Ruby JRuby #2 24.8418.241,284,372255  22% 14% 14% 88%
1.0Ruby #2 8.388.39131,808255  0% 1% 0% 100%
1.0Hack #2 7.207.22491,796261  53% 4% 0% 45%
1.0PHP #2 5.845.84444,344262  1% 0% 1% 100%
1.1Perl #3 2.742.74375,760284  1% 0% 0% 100%
1.2Hack 8.068.07490,152294  4% 97% 1% 1%
1.2PHP 5.845.85369,924297  1% 1% 1% 100%
1.3Python 3 #4 5.655.661,010,488325  1% 100% 1% 1%
1.5OCaml #2 4.274.28214,136394  1% 0% 1% 100%
2.0Scala #4 2.282.18376,408501  4% 100% 1% 3%
2.1Go #3 1.141.14160,720543  2% 1% 100% 1%
2.1Go #2 1.111.11160,948546  0% 0% 100% 3%
2.1Racket 13.8313.84566,096547  1% 1% 0% 100%
2.2Dart #3 22.8822.301,770,192551  5% 55% 34% 11%
2.2Dart #2 24.1823.491,768,620555  88% 3% 15% 1%
2.2C++ g++ 2.752.76248,576571  1% 1% 0% 100%
2.3Java  #4 2.402.30371,252592  3% 99% 4% 3%
2.4Erlang HiPE #3 60.1057.461,336,884624  18% 17% 50% 24%
2.4Erlang #3 68.0966.011,196,576624  27% 1% 73% 3%
2.5C++ g++ #5 22.6322.64141,236646  100% 0% 1% 1%
2.8C gcc #4 1.121.13126,044704  0% 6% 4% 100%
2.9Clojure #5 4.362.77585,660727  10% 17% 43% 91%
2.9C gcc #2 0.750.49251,716741  33% 20% 31% 72%
2.9Java  #6 1.701.40526,320745  4% 37% 4% 82%
2.9Pascal Free Pascal #2 2.022.02125,648751  1% 0% 100% 2%
3.0Scala #8 1.801.36477,268761  39% 4% 90% 4%
3.0Fortran Intel #2 6.436.43155,376772  1% 89% 1% 11%
3.1Python 3 #6 4.402.95262,292800  21% 81% 2% 48%
3.2C++ g++ #3 1.151.16126,732810  1% 100% 2% 1%
3.4C# Mono #3 5.094.87261,800863  5% 2% 0% 100%
3.4Go #4 1.330.77453,000874  59% 51% 26% 43%
3.5Ada 2005 GNAT 2.852.85126,984885  100% 0% 2% 1%
3.5Lisp SBCL 2.272.28294,624896  1% 100% 1% 0%
3.6Haskell GHC #2 2.732.34628,112919  8% 7% 100% 6%
3.9Haskell GHC #3 1.521.36129,412999  3% 5% 4% 100%
3.9Clojure #4 5.744.25364,9921005  16% 77% 33% 11%
4.0Fortran Intel 1.011.01248,6361013  2% 2% 99% 3%
4.0Racket #2 4.354.36182,3601026  1% 1% 100% 1%
4.2OCaml 0.001.5265,2641064  4% 8% 79% 63%
4.2C++ g++ #2 0.960.97247,9561082  100% 1% 0% 2%
4.3C# Mono 1.551.55199,3801099  99% 1% 2% 1%
4.5Clojure 4.203.16410,4841135  83% 14% 11% 26%
4.6Erlang HiPE #4 47.2438.09637,3401167  54% 9% 53% 10%
4.6Erlang #4 46.0835.63675,4161167  12% 78% 29% 11%
4.9Go 0.920.76250,6801243  88% 9% 26% 3%
5.1Erlang HiPE 21.1610.83859,3001302  33% 92% 30% 42%
5.1Erlang 20.1810.341,029,9521302  44% 46% 51% 56%
5.2OCaml #3 0.000.7331,4361314  47% 47% 52% 70%
6.4Java  #7 3.067.14283,6921640  17% 7% 38% 85%
6.5Java  #3 2.681.27315,2961661  41% 48% 34% 92%
7.3C gcc 0.930.58373,5161867  96% 4% 24% 38%
7.8Rust 1.241.03260,1121985  13% 82% 10% 19%
8.1OCaml #4 1.491.49137,3762064  0% 1% 9% 100%
8.9C++ g++ #4 0.950.58214,0122275  41% 26% 14% 86%
13Ada 2005 GNAT #2 0.910.78203,0363220  79% 3% 4% 37%
Scala #6 Failed519
Scala #7 Failed949
Scala #5 Failed329
"wrong" (different) algorithm / less comparable programs
1.2Python 3 #5 3.843.85496,920306
1.9Java  1.601.56527,324476
3.2Clojure #3 4.623.62586,000812
missing benchmark programs
F# Mono No program

 reverse-complement benchmark : Read DNA sequences - write their reverse-complement

You can write your own program for this task and contribute to the benchmarks game by following these general instructions.

More specifically:

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