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.0Java  #5 5.782.2032,6202457  62% 75% 63% 65%
1.2Fortran Intel #4 2.702.702441327  1% 0% 0% 100%
1.5C gcc #5 3.393.393641261  2% 0% 1% 100%
1.8Haskell GHC #2 4.494.022,732979  5% 6% 100% 5%
1.9Ada 2005 GNAT #5 4.114.111,4922186  0% 1% 100% 2%
1.9C++ g++ #3 4.234.231,0721286  1% 95% 1% 5%
2.0C++ g++ #2 4.444.458281105  1% 0% 0% 100%
2.0Fortran Intel #3 4.464.465081190  0% 0% 0% 100%
2.1C++ g++ 4.684.688241033  0% 1% 1% 100%
2.4Java  #4 5.375.2820,6681507  1% 70% 1% 31%
2.7Fortran Intel 5.975.975081155  0% 0% 0% 100%
2.8C gcc #4 6.066.073601221  1% 0% 100% 0%
2.8C++ g++ #4 6.256.253601266  1% 0% 1% 100%
2.9Scala #3 6.516.3726,9081053  2% 26% 1% 75%
3.0C# Mono #2 6.546.5520,1921180  1% 97% 0% 4%
3.0Clojure #6 7.996.5767,4001653  88% 5% 10% 20%
3.3C gcc 7.267.263641185  0% 1% 100% 1%
3.3Go 7.267.271,0281036  1% 1% 1% 100%
3.6Lisp SBCL #6 7.847.848,8841751  1% 100% 1% 0%
3.7Java  #2 8.198.0821,4841240  57% 1% 2% 44%
3.8F# Mono 8.428.4321,520978  1% 0% 100% 1%
4.1Dart 9.169.0863,7601386  1% 1% 1% 99%
4.4C# Mono #4 9.569.5748,4201505  94% 0% 6% 1%
4.7Clojure #5 12.1410.4367,5441839  8% 7% 13% 90%
4.8OCaml #6 10.5110.52198,0801161  0% 0% 1% 100%
4.9Scala 10.8410.7027,1121080  1% 14% 2% 85%
4.9Lisp SBCL #3 10.7310.748,6521579  1% 1% 0% 100%
5.1Pascal Free Pascal #4 11.1311.1481112  0% 1% 100% 1%
5.3Ada 2005 GNAT 11.7411.751,4921346  1% 0% 0% 100%
6.1OCaml #3 13.4113.423,1241042  42% 0% 0% 58%
7.8Racket #3 17.2217.2224,5841276  0% 0% 1% 100%
8.5Lisp SBCL 18.5718.588,6521419  0% 0% 0% 100%
8.7Lisp SBCL #2 19.1819.198,6521617  0% 1% 100% 0%
13Erlang HiPE #2 29.4329.4314,1641164  86% 0% 14% 0%
16Hack #4 34.5434.56319,9761109  1% 1% 0% 100%
23Racket 50.3550.3523,1201054  1% 0% 0% 100%
26Hack #3 56.7756.80303,9281029  1% 0% 0% 100%
28Erlang #2 60.5660.5812,2841164  96% 0% 4% 0%
30Erlang HiPE 66.8966.9013,5361039  62% 38% 0% 0%
31Hack #2 67.9467.9755,6081003  1% 100% 1% 1%
43Erlang 94.2594.2712,2961039  100% 0% 0% 0%
48Perl 104.98105.03100,328838  0% 100% 0% 0%
62PHP #3 133.11136.583,3281030  60% 36% 4% 0%
69Ruby #5 146.20151.337,520987  27% 30% 7% 39%
71Ruby #4 152.99156.24247,516904  26% 32% 17% 28%
76Python 3 #2 161.75166.415,576788  25% 27% 16% 34%
76Python 3 163.25167.315,584792  32% 35% 20% 15%
95Ruby #2 207.88207.95202,928732  89% 1% 0% 11%
99Ruby JRuby 222.09218.60625,440760  22% 22% 38% 24%
131Perl #4 285.70288.562,388934  1% 1% 0% 99%
175Perl #2 6 min6 min2,648886  37% 63% 0% 0%
196PHP #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.0Perl #5 2.102.1025,1321113
2.1C gcc #2 4.674.676161169
6.5Haskell GHC #3 15.8214.232,4681408
missing benchmark programs
Rust No program

 fasta benchmark : Generate and write random DNA sequences

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