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

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

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.

    sortsort sort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0C gcc #4 22.4022.4185,1481525  1% 0% 0% 100%
1.1C++ g++ #4 15.1715.1894,5721759  1% 0% 1% 100%
1.2Ruby #8 36.4236.45104,100529  0% 0% 1% 100%
1.2Ada 2005 GNAT #6 22.4422.47104,7043740  1% 0% 0% 100%
1.5C gcc #2 29.6229.63127,7961099  0% 1% 1% 100%
1.6Perl #2 25.5725.60139,096527  0% 1% 1% 100%
1.7Perl #4 32.3832.40142,656440  0% 1% 1% 100%
1.8PHP #4 28.6228.65152,260832  1% 1% 0% 100%
1.8Ruby #6 28.6228.63152,388442  0% 1% 1% 100%
1.8Ruby #5 36.4236.43152,548343  0% 1% 1% 100%
2.0Erlang HiPE #6 38.7038.72169,8161058  1% 0% 0% 100%
2.0Ada 2005 GNAT #5 19.1119.13174,3603492  1% 2% 1% 100%
2.1C++ g++ 5.495.50180,060648  1% 0% 0% 100%
2.1C++ g++ #3 31.7031.71180,708844  1% 1% 0% 100%
2.2Ruby #7 37.6337.66185,100507  0% 1% 1% 100%
2.2Rust #2 3.803.80191,108669  0% 1% 2% 100%
2.3C++ g++ #2 5.525.53193,624695  1% 1% 0% 100%
2.5PHP #3 28.5028.52210,868459  0% 0% 1% 100%
2.5PHP #2 39.2939.30213,244449  0% 1% 0% 100%
2.6PHP 12.9428.57219,256788  1% 1% 0% 100%
2.7Python 3 23.5623.68234,048478  1% 1% 0% 100%
2.8Haskell GHC #2 33.7633.78241,3401518  1% 0% 0% 100%
2.9Python 3 #5 23.7623.78247,732424  0% 0% 1% 100%
3.0Dart #2 75.1575.20256,184648  1% 0% 0% 100%
3.4C gcc 5.435.44293,2042579  1% 1% 0% 100%
4.0Lua #2 31.2631.27340,104596  0% 1% 1% 100%
4.2C# Mono #2 85.2285.26354,356594  1% 0% 0% 100%
4.3Smalltalk VisualWorks 10 min10 min362,756584  0% 0% 1% 100%
4.4C# Mono #6 85.1885.23377,268638  1% 0% 0% 100%
4.5Ruby #3 36.0836.12381,520501  0% 1% 1% 100%
4.7JavaScript V8 #2 3.383.39397,712373  0% 1% 1% 100%
4.9Ruby #2 35.4135.43417,460417  0% 1% 1% 100%
5.0Ruby 51.2551.27428,144308  0% 0% 1% 100%
5.1Lua 45.0045.03436,192437  0% 1% 1% 100%
5.1C# Mono #7 86.2886.34437,208898  1% 0% 0% 100%
5.2C# Mono 88.2688.31440,244624  0% 1% 1% 100%
5.7Scala #5 27.1027.11483,6561704  1% 1% 1% 100%
6.7Java  #7 20.7920.80567,4041284  0% 0% 1% 100%
6.7Java  #8 20.9520.97567,6561377  1% 0% 0% 100%
6.7Java  #6 22.2722.28571,8161410  2% 1% 1% 100%
7.1Lisp SBCL #3 43.1443.17605,3001948  0% 0% 1% 100%
7.9Racket 39.5139.53669,096527  0% 1% 0% 100%
8.4Scala #2 24.7824.80712,748668  0% 1% 1% 100%
8.6Java  #5 24.0524.07735,044929  1% 1% 0% 100%
8.6Ruby JRuby #7 50.8250.85736,184507  0% 1% 1% 100%
8.8Java  #4 24.4624.48745,596921  1% 1% 0% 100%
8.9F# Mono #2 91.4091.44754,460413  0% 1% 1% 100%
9.0Java  #2 33.0233.05762,6601534  1% 1% 0% 100%
9.3F# Mono 86.8186.85789,980639  1% 0% 0% 100%
10Scala 34.0034.02853,952611  1% 1% 0% 100%
11Ruby JRuby #5 46.3146.34942,108343  0% 1% 1% 100%
12F# Mono #4 86.6986.73985,876899  0% 1% 0% 100%
12Ruby JRuby #6 49.9349.961,012,776442  0% 1% 1% 100%
12Go #7 87.2087.241,060,660652  0% 1% 1% 100%
14Go #8 86.4386.461,154,804785  0% 1% 1% 100%
14Go #2 48.1848.201,196,376789  0% 1% 1% 100%
15Go 143.24143.301,239,600733  0% 1% 1% 100%
22F# Mono #3 88.2588.291,901,140870  1% 0% 0% 100%
24Ruby JRuby #2 58.5558.592,021,740417  0% 1% 1% 100%
24Ruby JRuby #3 56.9657.012,025,596501  1% 1% 1% 100%
24Ruby JRuby 81.8481.892,052,508308  1% 1% 1% 100%
C CINT #2 Failed1099
C CINT Bad Output1101
Clojure #3 Failed710
Clojure #4 Failed707
Erlang HiPE Timed Out5 min622
JavaScript V8 Bad Output365
Lisp SBCL Bad Output591
Lua #3 Failed669
OCaml #4 Failed1050
OCaml #2 Failed615
OCaml Failed1502
OCaml #3 Failed1014
Racket #2 Bad Output536
Ruby JRuby #8 Failed529
Scala #3 Failed633
Scala #4 Failed723
"wrong" (different) algorithm / less comparable programs
1.3Pascal Free Pascal 21.6521.66111,8841199
1.6Perl #7 4.114.13138,828567
2.2Perl #6 4.164.17188,248477
2.3Erlang HiPE #7 6.606.62194,0321198
3.1Java  #3 8.168.17268,0402084
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