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 72.5772.632,048,076308  1% 0% 0% 100%
1.0Ruby 45.5945.62267,608308  1% 1% 0% 100%
1.1Ruby JRuby #5 40.4540.48981,456343  1% 0% 0% 100%
1.1Ruby #5 28.6528.66155,324343  1% 1% 0% 100%
1.2JavaScript V8 #2 3.443.45584,372373  0% 1% 1% 100%
1.3F# Mono #2 67.4767.50834,448413  0% 1% 0% 100%
1.4Ruby JRuby #2 6 min6 min2,150,896417  0% 1% 1% 100%
1.4Ruby #2 32.9432.96291,952417  1% 1% 0% 100%
1.4Python 3 #5 23.5823.61326,820424  0% 0% 1% 100%
1.4Lua 44.3444.38467,336437  0% 0% 0% 100%
1.4Perl #4 60.2860.31188,604440  0% 0% 0% 100%
1.4Ruby JRuby #6 42.7142.75976,416442  0% 0% 1% 100%
1.4Ruby #6 25.2325.24145,012442  0% 0% 1% 100%
1.4Hack #2 7.057.05248,828446  1% 1% 1% 100%
1.5PHP #2 34.1734.19207,884449  0% 0% 0% 100%
1.5Hack #3 7.047.05238,600456  0% 1% 1% 100%
1.5PHP #3 26.3426.35219,356459  0% 1% 0% 100%
1.6Python 3 23.0823.19257,976478  0% 1% 1% 100%
1.6Ruby #3 33.5933.61301,104501  1% 0% 0% 100%
1.6Ruby JRuby #3 6 min6 min2,152,332501  1% 0% 0% 100%
1.6Ruby #7 29.3129.32253,888507  1% 0% 0% 100%
1.6Ruby JRuby #7 261.66261.78781,332507  0% 1% 1% 100%
1.7Racket 40.1040.13713,892527  0% 0% 1% 100%
1.7Perl #2 30.6930.72139,344527  0% 0% 0% 100%
1.7Ruby #8 28.6528.66118,456529  1% 1% 0% 100%
1.9Smalltalk VisualWorks 5 min5 min356,756584  0% 0% 0% 100%
1.9C# Mono #2 66.5066.53275,404594  0% 0% 1% 100%
1.9Lua #2 30.9931.01349,596596  0% 0% 0% 100%
2.0Scala 37.2237.25861,140611  0% 1% 1% 100%
2.0OCaml #2 19.0319.06511,660615  0% 0% 0% 100%
2.0C# Mono 67.0567.09611,776624  0% 1% 0% 100%
2.1C# Mono #6 65.8065.84271,844638  0% 1% 1% 100%
2.1F# Mono 62.5062.53996,140639  0% 1% 1% 100%
2.1C++ g++ 5.225.23197,900648  1% 1% 1% 100%
2.1Go #7 86.3886.42554,256652  1% 1% 0% 100%
2.2Scala #2 24.5224.53655,868668  1% 0% 1% 100%
2.2Lua #3 19.2619.27346,052669  0% 0% 0% 100%
2.3C++ g++ #2 5.225.22202,556695  1% 1% 0% 100%
2.3Clojure #4 25.3225.34691,820707  1% 1% 0% 100%
2.3Clojure #3 43.0743.11782,528710  0% 1% 1% 100%
2.4Go 120.81120.87548,932733  1% 0% 1% 100%
2.5Rust 35.1535.17222,140763  0% 1% 1% 100%
2.5Go #8 86.1386.17508,876785  0% 1% 0% 100%
2.6Hack 3.987.39236,540787  1% 1% 1% 100%
2.6PHP 12.0626.53200,280788  0% 0% 0% 100%
2.6Go #2 47.3447.37523,244789  1% 1% 0% 100%
2.7Hack #4 7.457.46181,356832  1% 1% 1% 100%
2.7PHP #4 26.4426.47151,124832  0% 0% 0% 100%
2.7C++ g++ #3 26.0326.05177,352844  0% 1% 1% 100%
2.8F# Mono #3 63.2763.302,387,044870  0% 1% 0% 100%
2.9F# Mono #4 61.4961.52989,852899  1% 1% 0% 100%
3.0Java  #4 23.4623.47842,236921  1% 0% 0% 100%
3.0Java  #5 23.1823.19766,072929  1% 1% 0% 100%
3.3OCaml #3 19.2219.26511,7121014  0% 0% 0% 100%
3.4OCaml #4 1.4423.16264,7441050  0% 0% 0% 100%
3.4Erlang HiPE #6 32.9632.97236,2881058  1% 0% 0% 100%
3.6C gcc #2 30.0430.06126,7641099  1% 1% 1% 100%
4.2Java  #7 23.3023.31566,6281284  1% 1% 0% 100%
4.5Java  #8 20.9420.95567,2761377  2% 9% 1% 100%
4.9OCaml 19.2219.25511,7241502  0% 0% 0% 100%
4.9Haskell GHC #2 26.5326.54335,6441518  0% 1% 1% 100%
5.0C gcc #4 23.2223.2387,9321525  0% 1% 1% 100%
5.0Java  #2 33.3433.36763,2721534  1% 1% 1% 100%
5.5Scala #5 27.7827.80466,3401704  0% 1% 0% 100%
5.7C++ g++ #4 12.6212.6397,0601759  0% 1% 1% 100%
6.3Lisp SBCL #3 43.7943.82566,7841948  1% 1% 1% 100%
8.4C gcc 5.225.23321,9082579  1% 0% 1% 100%
11Ada 2005 GNAT #5 17.7417.76123,8643492  0% 1% 1% 100%
12Ada 2005 GNAT #6 23.3523.38112,8043740  1% 0% 0% 100%
Dart #2 Timed Out1h 00 min648
Erlang HiPE Timed Out10 min622
Java  #6 Failed1410
JavaScript V8 Bad Output365
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
1.5Perl #6 4.424.43190,588477
1.8Perl #7 4.244.26139,600567
3.9Erlang HiPE #7 6.416.42235,8321198
3.9Pascal Free Pascal 21.0421.05111,8161199
6.8Java  #3 7.677.67270,7722084
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