regex-dna benchmark ≈50MB N=5,000,000

Each chart bar shows how many times slower, one ↓ regex-dna 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.

     sortsortsort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0OCaml #4 1.468.96264,7441050  84% 95% 85% 85%
2.7Hack 3.993.79234,252787  31% 39% 54% 74%
3.6C++ g++ 5.235.23208,580648  2% 100% 1% 1%
3.6C++ g++ #2 5.273.55198,920695  9% 49% 69% 26%
4.0C gcc 5.812.44305,4882579  60% 51% 80% 52%
4.8Hack #3 7.017.02232,076456  1% 1% 0% 100%
4.8Hack #2 7.017.02232,080446  1% 1% 1% 100%
5.3Hack #4 7.662.75176,952832  76% 67% 58% 80%
8.3PHP 12.0610.71210,752788  64% 57% 46% 79%
8.7C++ g++ #4 12.644.2598,1601759  67% 75% 97% 60%
12Ada 2005 GNAT #5 17.885.80123,8523492  77% 77% 87% 68%
13OCaml #2 19.0419.06511,656615  43% 0% 0% 57%
13OCaml #3 19.2510.81511,7161014  27% 26% 39% 87%
13OCaml 19.2710.78511,7241502  88% 26% 26% 39%
15Java  #8 21.3521.06571,2481377  100% 1% 2% 1%
15Java  #7 21.4620.88569,4881284  98% 3% 2% 1%
16Java  #6 22.726.31648,9241410  89% 96% 88% 89%
16Python 3 22.9810.42269,120478  40% 48% 83% 55%
16C gcc #4 23.377.80103,7521525  71% 66% 100% 64%
16Ada 2005 GNAT #6 23.457.76111,1283740  65% 68% 97% 72%
16Python 3 #5 23.5623.58326,816424  1% 0% 100% 0%
16Java  #4 23.5722.05837,712921  3% 11% 10% 84%
17Java  #5 24.618.46743,764929  68% 77% 80% 67%
17Ruby #6 25.1525.16145,292442  1% 0% 0% 100%
17Scala #2 25.319.04665,184668  62% 62% 97% 60%
18C++ g++ #3 26.2416.57182,520844  1% 0% 64% 94%
18PHP #4 26.249.60151,380832  52% 70% 57% 95%
18PHP #3 26.3226.34208,852459  80% 0% 0% 21%
19Clojure #4 27.168.59606,564707  69% 92% 75% 81%
20Ruby #5 28.6328.64154,932343  1% 0% 100% 1%
20Ruby #8 28.739.65118,660529  66% 65% 67% 100%
20Ruby #7 29.3610.51259,920507  63% 63% 82% 71%
20Scala #5 29.378.47461,3321704  87% 82% 91% 88%
21C gcc #2 30.0630.07124,8801099  1% 0% 100% 1%
21Perl #2 30.7511.21141,108527  49% 70% 76% 80%
23Ruby #2 33.0233.03291,252417  4% 36% 33% 28%
23Ruby #3 33.5114.64283,740501  45% 46% 97% 42%
23PHP #2 34.1934.22216,440449  92% 0% 8% 0%
24Erlang HiPE #6 34.609.60434,1721058  90% 92% 91% 88%
24Erlang #6 35.029.95395,4681058  90% 90% 88% 85%
24Rust 35.2611.95228,296763  65% 66% 87% 78%
25Haskell GHC #2 35.699.52250,0081518  93% 91% 96% 96%
27Java  #2 38.8112.43739,5721534  68% 80% 73% 93%
27Scala 38.9834.78833,896611  61% 5% 7% 41%
28Racket 40.0740.07720,060527  0% 1% 100% 0%
29Ruby JRuby #5 42.4936.35997,324343  24% 20% 68% 10%
31Lisp SBCL #3 44.5820.92605,5041948  43% 42% 86% 43%
31Ruby 45.4945.51266,028308  1% 0% 0% 100%
33Go #2 48.4916.64549,688789  64% 64% 95% 69%
34Ruby JRuby #6 48.7942.411,023,248442  38% 7% 20% 52%
34Ruby JRuby #7 49.5816.58787,976507  69% 67% 81% 84%
36Clojure #3 51.9425.59579,784710  61% 43% 49% 50%
39Ruby JRuby #3 56.6421.101,993,204501  64% 70% 68% 68%
43Perl #4 62.2662.29189,296440  0% 0% 0% 100%
45F# Mono #3 65.1121.762,343,812870  71% 79% 75% 76%
45Ruby JRuby #2 65.1822.681,961,188417  58% 65% 79% 87%
46C# Mono #2 66.3166.33289,808594  1% 14% 18% 68%
46C# Mono 66.9867.01754,780624  40% 1% 60% 1%
47F# Mono 67.9021.24938,844639  76% 80% 81% 83%
47F# Mono #2 67.9167.93899,772413  1% 95% 4% 2%
48F# Mono #4 69.5023.92936,532899  70% 70% 85% 72%
50C# Mono #6 72.1528.63337,224638  52% 56% 67% 78%
60Go #8 86.7826.32513,712785  77% 100% 77% 77%
60Go #7 87.1986.35467,180652  1% 54% 26% 22%
61Ruby JRuby 89.1878.982,182,572308  9% 91% 7% 8%
104Go 151.8448.96579,096733  92% 73% 75% 71%
Dart #2 Timed Out1h 00 min648
Erlang Timed Out10 min622
Erlang HiPE Timed Out10 min622
Lisp SBCL Timed Out5 min591
Racket #2 Bad Output536
Ruby JRuby #8 Failed529
Scala #4 Failed723
Scala #3 Failed633
"wrong" (different) algorithm / less comparable programs
3.0Perl #7 4.332.92140,044567
3.1Perl #6 4.454.46190,244477
5.3Java  #3 7.672.83270,2762084
5.4Erlang HiPE #7 7.833.05398,5401198
5.8Erlang #7 8.443.91356,2281198
14Pascal Free Pascal 20.9720.99114,8521199
missing benchmark programs
Fortran Intel No program
Pascal Free Pascal No program

 regex-dna benchmark : Match DNA 8-mers and substitute nucleotides for IUB codes

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 100KB input file (generated with the fasta program N = 10000) 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 FASTA files generated by the fasta benchmark as input for this benchmark. Note: the file may include both lowercase and uppercase codes.

Each program should

Revised BSD license

  Home   Conclusions   License   Play