reverse-complement benchmark N=1,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.0Python development version #4 0.020.02?449  0% 100% 0% 0%
1.0Python development version #5 0.020.02?458  0% 100% 0% 0%
1.0Python development version #5 0.020.02?458  0% 0% 100% 0%
1.0Python development version #4 0.020.02?449  100% 0% 0% 0%
1.0Python development version #6 0.020.02?878  0% 100% 0% 33%
1.0Python development version #4 0.020.02?449  67% 33% 0% 33%
1.1Python development version #5 0.020.02?458  33% 100% 0% 0%
1.1Python development version #6 0.020.02?878  0% 100% 0% 0%
1.1Python development version #6 0.020.02?878  33% 33% 0% 50%
1.4Cython #5 0.030.03?458  100% 25% 0% 0%
1.5Python 3 #4 0.030.03?449  100% 0% 0% 0%
1.5Cython #4 0.030.03?449  0% 0% 0% 100%
1.5Python 3 #4 0.030.03?449  0% 75% 0% 0%
1.5Python 3 #5 0.030.03?458  0% 100% 0% 0%
1.5Python 3 #5 0.030.03?458  0% 0% 100% 0%
1.6Cython #5 0.030.03?458  0% 0% 0% 80%
1.6Cython #4 0.030.03?449  0% 0% 0% 100%
1.6Python development version #3 0.030.03?410  100% 0% 0% 0%
1.6Python 3 #4 0.030.03?449  75% 25% 0% 0%
1.6Python 3 #6 0.030.03?878  0% 75% 0% 0%
1.6Cython #4 0.030.03?449  0% 25% 100% 0%
1.6Python 3 #5 0.030.03?458  100% 0% 0% 20%
1.6Python development version #3 0.030.03?410  0% 0% 0% 100%
1.7Cython #5 0.030.04?458  0% 0% 0% 100%
1.7Python development version #3 0.030.04?410  75% 0% 0% 0%
1.7Python 3 #6 0.040.04?878  0% 0% 0% 100%
1.7Python 3 #6 0.030.04?878  75% 0% 0% 0%
1.8Cython #3 0.040.04?410  100% 0% 0% 0%
1.8Python 3 #3 0.040.04?410  0% 75% 0% 0%
1.8Python 3 #3 0.040.04?410  0% 100% 0% 0%
1.9Python 3 #3 0.040.04?410  100% 0% 0% 25%
1.9Cython #3 0.040.04?410  0% 0% 0% 80%
1.9Cython #3 0.040.04?410  0% 100% 0% 0%
2.2Nuitka #5 0.050.05?458  0% 100% 0% 0%
2.2Nuitka #6 0.050.05?878  0% 100% 0% 0%
2.3Nuitka #4 0.050.05?449  20% 100% 0% 0%
2.3Nuitka #4 0.050.05?449  0% 0% 0% 100%
2.3Nuitka #5 0.050.05?458  0% 0% 86% 20%
2.3Nuitka #5 0.050.05?458  20% 100% 0% 0%
2.3Nuitka #4 0.050.05?449  0% 0% 100% 17%
2.3Nuitka #3 0.050.05?410  0% 0% 100% 0%
2.3Nuitka #3 0.050.05?410  100% 17% 0% 0%
2.4Nuitka #6 0.050.05?878  0% 0% 100% 17%
2.5Nuitka #6 0.050.05?878  17% 100% 17% 20%
2.6Nuitka #3 0.050.05?410  0% 17% 100% 0%
4.0PyPy 3 #5 0.080.09?458  0% 0% 0% 100%
4.0PyPy 3 #5 0.080.09?458  0% 0% 0% 100%
4.0PyPy 3 #6 0.080.09?878  0% 0% 0% 100%
4.0PyPy 3 #4 0.080.09?449  11% 100% 0% 0%
4.1PyPy 3 #5 0.080.09?458  11% 0% 0% 100%
4.1PyPy 3 #6 0.080.09?878  11% 100% 0% 0%
4.1PyPy 3 #4 0.090.09?449  0% 0% 100% 0%
4.2PyPy 3 #4 0.090.09?449  10% 89% 0% 10%
4.2PyPy 3 #6 0.090.09?878  0% 100% 0% 0%
7.6PyPy 3 #3 0.160.16?410  0% 0% 100% 0%
7.8PyPy 3 #3 0.160.16?410  69% 31% 0% 0%
7.8PyPy 3 #3 0.160.16?410  53% 53% 6% 0%
missing benchmark programs
Python 2 No program
PyPy 2 No program
Jython No program
IronPython No program
Shedskin No program
Numba No program
Pyston No program
MicroPython No program
Grumpy 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