/mobile Handheld Friendly website

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

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

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.

    sortsort sort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0OCaml #3 1.5431,3161314  1% 1% 2% 100%
2.0OCaml 2.3262,9841064  0% 0% 1% 100%
4.0Ada 2005 GNAT 2.762.77123,784885  1% 2% 0% 100%
4.0C++ g++ #3 1.161.16125,176810  0% 0% 2% 100%
4.0C gcc #4 1.121.12125,180704  0% 1% 3% 99%
4.0Haskell GHC #3 1.191.19126,148999  0% 1% 0% 99%
4.1C++ g++ #5 18.5918.60127,072646  0% 1% 1% 100%
4.2Ruby #2 8.358.36130,036255  0% 1% 0% 100%
4.2Pascal Free Pascal #2 2.072.08131,756751  0% 1% 0% 100%
4.3OCaml #4 1.521.66135,0962064  0% 0% 2% 100%
4.9Fortran Intel 1.161.17153,5601013  3% 1% 2% 100%
5.1Go #3 1.191.20160,412543  1% 0% 1% 100%
5.1Go #2 1.151.16160,676546  1% 1% 4% 100%
5.3Fortran Intel #2 6.486.49165,828772  0% 0% 0% 100%
5.5Racket #2 4.364.36171,3161026  0% 0% 1% 100%
5.5C# Mono 2.392.39172,5521099  0% 1% 2% 100%
6.3Ada 2005 GNAT #2 0.930.95197,6563220  0% 1% 3% 99%
6.8OCaml #2 4.484.49211,500394  0% 0% 0% 100%
7.4C++ g++ #4 0.870.88230,8162275  0% 0% 1% 100%
7.6JavaScript V8 #3 15.6615.68238,844498  0% 1% 0% 100%
7.8C++ g++ #2 1.051.06245,0721082  0% 4% 6% 99%
7.8C++ g++ 2.702.71245,428571  0% 0% 2% 100%
7.9C gcc #2 0.710.71248,720741  4% 7% 1% 99%
8.0Rust 1.361.37248,980804  0% 4% 1% 100%
8.0Go 0.980.99249,6641243  1% 2% 1% 100%
8.4JavaScript V8 24.4624.49263,000390  0% 1% 1% 100%
8.6JavaScript V8 #4 8.748.75269,748787  0% 1% 1% 100%
8.6Java  #7 2.169.23270,5361640  48% 24% 1% 96%
9.1C# Mono #3 7.597.60286,444863  0% 1% 1% 100%
9.6Java  #3 2.702.71300,4241661  0% 0% 1% 100%
11Smalltalk VisualWorks 31.1031.13331,836754  0% 0% 0% 100%
12PHP 6.566.58369,944297  0% 0% 0% 100%
12Lisp SBCL 2.562.56372,808896  0% 0% 2% 100%
12Perl #3 2.902.91374,548284  0% 0% 0% 100%
13Scala #4 2.402.40410,720501  1% 0% 1% 100%
14PHP #2 6.416.42444,380262  0% 0% 0% 100%
15Java  #4 2.562.57481,176592  3% 1% 3% 100%
15C gcc 0.910.91482,4881867  2% 2% 1% 100%
16Clojure 13.8613.89507,3161044  0% 1% 0% 100%
17Scala #8 1.951.96516,716761  2% 0% 1% 100%
17Java  #6 1.861.87517,532745  0% 1% 1% 100%
17Hack 22.2522.29518,116294  0% 0% 1% 100%
17Clojure #4 14.8814.90537,236997  1% 1% 0% 100%
17Racket 13.6613.68546,088547  1% 0% 1% 100%
19Hack #2 22.8622.89582,200261  1% 0% 1% 100%
19Erlang HiPE #4 34.1934.22596,8161167  0% 0% 0% 100%
20Haskell GHC #2 2.172.18618,908919  1% 0% 2% 100%
20JavaScript V8 #2 21.4021.44632,232456  0% 1% 0% 100%
20Erlang HiPE 19.2019.23632,6161302  0% 0% 0% 100%
25Lua 18.3418.37796,612555  0% 0% 0% 100%
26Scala #7 3.863.87801,600949  0% 1% 1% 100%
31Python 3 #3 19.9419.97983,752295  1% 1% 1% 100%
32Python 3 #4 5.986.001,008,592325  0% 1% 1% 100%
37Ruby JRuby #2 25.5325.561,157,700255  1% 1% 1% 100%
42Erlang HiPE #3 48.6648.741,307,344624  0% 0% 0% 100%
57Dart #3 21.5821.621,795,240551  0% 1% 1% 100%
61Dart #2 33.5133.571,903,564555  0% 1% 1% 100%
Dart Failed443
Lua #3 Failed593
Scala #6 Failed519
Scala #5 Failed329
"wrong" (different) algorithm / less comparable programs
16Python 3 #5 4.074.08488,100306
16Java  1.791.79516,224476
21Clojure #3 15.0415.06661,076812
26JavaScript V8 #5 55.7755.84818,220407
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