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

Each chart bar shows how many times more Code, one ↓ regex-dna program used, compared to the program that used least Code.

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.0Ruby JRuby 89.1878.982,182,572308  9% 91% 7% 8%
1.0Ruby 40.5240.54371,580308  0% 1% 1% 100%
1.1Ruby JRuby #5 42.4936.35997,324343  24% 20% 68% 10%
1.1Ruby #5 28.0228.03106,492343  0% 1% 1% 100%
1.3F# Mono #2 67.9167.93899,772413  1% 95% 4% 2%
1.4Ruby #2 28.1828.19434,096417  38% 8% 16% 40%
1.4Ruby JRuby #2 65.1822.681,961,188417  58% 65% 79% 87%
1.4Python 3 #5 23.4523.46326,832424  99% 1% 1% 1%
1.4Perl #4 34.9834.99142,320440  1% 0% 100% 0%
1.4Ruby JRuby #6 48.7942.411,023,248442  38% 7% 20% 52%
1.4Ruby #6 24.4224.43144,896442  1% 0% 100% 1%
1.4Hack #2 7.017.02232,080446  1% 1% 1% 100%
1.5PHP #2 37.6337.65210,944449  1% 1% 1% 100%
1.5Hack #3 7.017.02232,076456  1% 1% 0% 100%
1.5PHP #3 27.3327.34229,012459  1% 1% 1% 100%
1.6Python 3 22.8910.29259,568478  71% 38% 39% 75%
1.6Ruby #3 30.9210.51397,644501  70% 65% 66% 95%
1.6Ruby JRuby #3 56.6421.101,993,204501  64% 70% 68% 68%
1.6Ruby JRuby #7 49.5816.58787,976507  69% 67% 81% 84%
1.6Ruby #7 31.4910.89215,924507  66% 76% 63% 86%
1.7Perl #2 27.169.70142,492527  76% 75% 77% 54%
1.7Racket 39.8539.85731,168527  1% 59% 1% 42%
1.7Ruby #8 27.989.46106,548529  64% 68% 92% 72%
1.9C# Mono #2 66.3166.33289,808594  1% 14% 18% 68%
2.0Scala 38.9834.78833,896611  61% 5% 7% 41%
2.0OCaml #2 18.9418.95517,492615  1% 0% 100% 0%
2.0C# Mono 66.9867.01754,780624  40% 1% 60% 1%
2.1C# Mono #6 72.1528.63337,224638  52% 56% 67% 78%
2.1F# Mono 67.9021.24938,844639  76% 80% 81% 83%
2.1C++ g++ 5.235.23208,580648  2% 100% 1% 1%
2.1Dart #2 32.5831.67350,480648  4% 99% 1% 1%
2.1Go #7 87.1986.35467,180652  1% 54% 26% 22%
2.2Scala #2 25.319.04665,184668  62% 62% 97% 60%
2.3C++ g++ #2 5.273.55198,920695  9% 49% 69% 26%
2.3Clojure #4 27.168.59606,564707  69% 92% 75% 81%
2.3Clojure #3 51.9425.59579,784710  61% 43% 49% 50%
2.4Go 151.8448.96579,096733  92% 73% 75% 71%
2.5Go #8 86.7826.32513,712785  77% 100% 77% 77%
2.6Hack 3.993.79234,252787  31% 39% 54% 74%
2.6PHP 12.5210.77232,020788  55% 55% 55% 91%
2.6Go #2 48.4916.64549,688789  64% 64% 95% 69%
2.7Hack #4 7.662.75176,952832  76% 67% 58% 80%
2.7PHP #4 27.699.58150,456832  64% 60% 67% 100%
2.7C++ g++ #3 26.2416.57182,520844  1% 0% 64% 94%
2.8F# Mono #3 65.1121.762,343,812870  71% 79% 75% 76%
2.9C# Mono #7 70.9220.04473,344898  85% 90% 94% 86%
2.9F# Mono #4 69.5023.92936,532899  70% 70% 85% 72%
3.0Java  #4 23.5722.05837,712921  3% 11% 10% 84%
3.0Java  #5 24.618.46743,764929  68% 77% 80% 67%
3.3OCaml #3 19.1510.65516,9761014  27% 28% 87% 39%
3.4OCaml #4 1.399.43268,4801050  83% 83% 83% 100%
3.4Erlang #6 35.029.95395,4681058  90% 90% 88% 85%
3.4Erlang HiPE #6 34.609.60434,1721058  90% 92% 91% 88%
3.6C gcc #2 30.0630.07124,8801099  1% 0% 100% 1%
4.2Java  #7 21.4620.88569,4881284  98% 3% 2% 1%
4.5Java  #8 21.3521.06571,2481377  100% 1% 2% 1%
4.6Java  #6 22.726.31648,9241410  89% 96% 88% 89%
4.9OCaml 19.5710.85517,3561502  29% 27% 29% 98%
4.9Haskell GHC #2 42.1711.06257,1081518  93% 96% 96% 96%
5.0C gcc #4 23.377.80103,7521525  71% 66% 100% 64%
5.0Java  #2 38.8112.43739,5721534  68% 80% 73% 93%
5.5Scala #5 29.378.47461,3321704  87% 82% 91% 88%
5.7C++ g++ #4 12.644.2598,1601759  67% 75% 97% 60%
6.3Lisp SBCL #3 43.9220.57643,3481948  41% 91% 42% 42%
8.4C gcc 5.812.44305,4882579  60% 51% 80% 52%
11Ada 2005 GNAT #5 17.885.80123,8523492  77% 77% 87% 68%
12Ada 2005 GNAT #6 23.457.76111,1283740  65% 68% 97% 72%
Erlang Timed Out10 min622
Erlang HiPE Timed Out10 min622
Lisp SBCL Bad Output591
Racket #2 Bad Output536
Ruby JRuby #8 Failed529
Rust Make Error748
Scala #4 Failed723
Scala #3 Failed633
"wrong" (different) algorithm / less comparable programs
1.5Perl #6 4.144.15193,172477
1.8Perl #7 4.192.77141,684567
3.9Erlang HiPE #7 7.833.05398,5401198
3.9Erlang #7 8.443.91356,2281198
3.9Pascal Free Pascal 20.9720.99114,8521199
6.8Java  #3 7.672.83270,2762084
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