fasta benchmark ≈240MB N=25,000,000

Each chart bar shows how many times slower, one ↓ fasta 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.0C gcc #6 5.721.945,0401914  89% 99% 63% 47%
1.1Java  #5 5.782.1633,6402457  84% 59% 61% 66%
1.4Fortran Intel #4 2.702.702441327  1% 0% 0% 100%
1.7C gcc #5 3.393.393641261  2% 0% 1% 100%
2.1Haskell GHC #2 4.494.022,732979  5% 6% 100% 5%
2.1Ada 2005 GNAT #5 4.114.111,4922186  0% 1% 100% 2%
2.2C++ g++ #3 4.234.231,0721286  1% 95% 1% 5%
2.3C++ g++ #2 4.444.458281105  1% 0% 0% 100%
2.3Fortran Intel #3 4.464.465081190  0% 0% 0% 100%
2.4C++ g++ 4.684.688241033  0% 1% 1% 100%
2.6Rust 4.995.004,8121224  1% 0% 100% 0%
2.7Java  #4 5.365.2827,0241507  3% 96% 1% 3%
3.1Fortran Intel 5.975.975081155  0% 0% 0% 100%
3.1C gcc #4 6.066.073601221  1% 0% 100% 0%
3.2C++ g++ #4 6.256.253601266  1% 0% 1% 100%
3.3C# Mono #2 6.326.3322,2201180  0% 1% 0% 100%
3.3Scala #3 6.466.3530,7201053  6% 94% 1% 3%
3.4Clojure #6 7.976.6473,5001653  5% 50% 8% 58%
3.7C gcc 7.267.263641185  0% 1% 100% 1%
3.7Go 7.267.271,0281036  1% 1% 1% 100%
4.0Lisp SBCL #6 7.847.848,8841751  1% 100% 1% 0%
4.1Java  #2 8.098.0027,1681240  2% 98% 1% 2%
4.3F# Mono 8.248.2421,504978  0% 0% 1% 100%
4.7Dart 9.099.0618,0921386  1% 0% 1% 99%
4.8C# Mono #4 9.319.3246,4121505  1% 6% 95% 0%
5.1Scala 10.119.9829,3881080  100% 1% 2% 1%
5.4OCaml #6 10.5110.52198,0801161  0% 0% 1% 100%
5.5Clojure #5 12.1310.5878,1041839  13% 5% 5% 92%
5.5Lisp SBCL #3 10.7310.748,6521579  1% 1% 0% 100%
5.7Pascal Free Pascal #4 11.1311.1481112  0% 1% 100% 1%
6.1Ada 2005 GNAT 11.7411.751,4921346  1% 0% 0% 100%
6.9OCaml #3 13.4113.423,1241042  42% 0% 0% 58%
8.9Racket #3 17.2217.2224,5841276  0% 0% 1% 100%
9.6Lisp SBCL 18.5718.588,6521419  0% 0% 0% 100%
10Lisp SBCL #2 19.1819.198,6521617  0% 1% 100% 0%
14Hack #4 27.7627.77336,9041109  0% 0% 1% 100%
15Erlang HiPE #2 29.4329.4314,1641164  86% 0% 14% 0%
26Racket 50.3550.3523,1201054  1% 0% 0% 100%
26Hack #3 50.5850.60336,9001029  0% 1% 1% 100%
31Hack #2 59.6959.7184,9761003  0% 1% 100% 0%
31Erlang #2 60.5660.5812,2841164  96% 0% 4% 0%
35Erlang HiPE 66.8966.9013,5361039  62% 38% 0% 0%
49Erlang 94.2594.2712,2961039  100% 0% 0% 0%
54Perl 104.98105.03100,328838  0% 100% 0% 0%
70PHP #3 133.11136.583,3281030  60% 36% 4% 0%
77Ruby #5 148.59148.667,652987  18% 23% 32% 29%
79Ruby #4 152.77152.91247,352904  11% 15% 24% 54%
86Python 3 #2 161.75166.415,576788  25% 27% 16% 34%
86Python 3 163.25167.315,584792  32% 35% 20% 15%
103Ruby #2 199.33199.40203,652732  1% 28% 0% 73%
107Ruby JRuby 214.27207.73664,912760  27% 35% 20% 22%
149Perl #4 285.70288.562,388934  1% 1% 0% 99%
198Perl #2 6 min6 min2,648886  37% 63% 0% 0%
222PHP #2 7 min7 min3,3281006  73% 11% 0% 16%
Haskell GHC Bad Output1421
Haskell GHC #4 Bad Output1413
"wrong" (different) algorithm / less comparable programs
1.1Perl #5 2.102.1025,1321113
2.4C gcc #2 4.674.676161169
7.3Haskell GHC #3 15.8214.232,4681408

 fasta benchmark : Generate and write random DNA sequences

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 N = 1000 with this 10KB 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.

Each program should

We'll use the generated FASTA file as input for other benchmarks (reverse-complement, k-nucleotide).

Random DNA sequences can be based on a variety of Random Models (554KB pdf). You can use Markov chains or independently distributed nucleotides to generate random DNA sequences online.

Revised BSD license

  Home   Conclusions   License   Play