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.0JavaScript V8 #2 3.543.55432,072405  1% 0% 1% 100%
1.1Rust #2 3.803.80191,108669  0% 1% 2% 100%
1.5C gcc 5.435.44293,2042579  1% 1% 0% 100%
1.6C++ g++ 5.495.50180,060648  1% 0% 0% 100%
1.6C++ g++ #2 5.525.53193,624695  1% 1% 0% 100%
3.7PHP 12.9428.57219,256788  1% 1% 0% 100%
4.3C++ g++ #4 15.1715.1894,5721759  1% 0% 1% 100%
5.4Ada 2005 GNAT #5 19.1119.13174,3603492  1% 2% 1% 100%
5.9Java  #7 20.7920.80567,4041284  0% 0% 1% 100%
5.9Java  #8 20.9520.97567,6561377  1% 0% 0% 100%
6.3Java  #6 22.2722.28571,8161410  2% 1% 1% 100%
6.3C gcc #4 22.4022.4185,1481525  1% 0% 0% 100%
6.3Ada 2005 GNAT #6 22.4422.47104,7043740  1% 0% 0% 100%
6.7Python 3 23.5623.68234,048478  1% 1% 0% 100%
6.7Python 3 #5 23.7623.78247,732424  0% 0% 1% 100%
6.8Java  #5 24.0524.07735,044929  1% 1% 0% 100%
6.9Java  #4 24.4624.48745,596921  1% 1% 0% 100%
7.0Scala #2 24.7824.80712,748668  0% 1% 1% 100%
7.2Perl #2 25.5725.60139,096527  0% 1% 1% 100%
7.7Scala #5 27.1027.11483,6561704  1% 1% 1% 100%
8.1PHP #3 28.5028.52210,868459  0% 0% 1% 100%
8.1Ruby #6 28.6228.63152,388442  0% 1% 1% 100%
8.1PHP #4 28.6228.65152,260832  1% 1% 0% 100%
8.4C gcc #2 29.6229.63127,7961099  0% 1% 1% 100%
8.8Lua #2 31.2631.27340,104596  0% 1% 1% 100%
9.0C++ g++ #3 31.7031.71180,708844  1% 1% 0% 100%
9.1Perl #4 32.3832.40142,656440  0% 1% 1% 100%
9.3Java  #2 33.0233.05762,6601534  1% 1% 0% 100%
9.5Haskell GHC #2 33.7633.78241,3401518  1% 0% 0% 100%
9.6Scala 34.0034.02853,952611  1% 1% 0% 100%
10Ruby #2 35.4135.43417,460417  0% 1% 1% 100%
10Erlang HiPE #6 35.9235.94177,0801058  0% 1% 1% 100%
10Ruby #3 36.0836.12381,520501  0% 1% 1% 100%
10Ruby #5 36.4236.43152,548343  0% 1% 1% 100%
10Ruby #8 36.4236.45104,100529  0% 0% 1% 100%
11Ruby #7 37.6337.66185,100507  0% 1% 1% 100%
11PHP #2 39.2939.30213,244449  0% 1% 0% 100%
11Racket 39.5139.53669,096527  0% 1% 0% 100%
12Lisp SBCL #3 43.1443.17605,3001948  0% 0% 1% 100%
13Lua 45.0045.03436,192437  0% 1% 1% 100%
13Ruby JRuby #5 46.3146.34942,108343  0% 1% 1% 100%
14Go #2 48.1848.201,196,376789  0% 1% 1% 100%
14Ruby JRuby #6 49.9349.961,012,776442  0% 1% 1% 100%
14Ruby JRuby #7 50.8250.85736,184507  0% 1% 1% 100%
14Ruby 51.2551.27428,144308  0% 0% 1% 100%
16Ruby JRuby #3 56.9657.012,025,596501  1% 1% 1% 100%
17Ruby JRuby #2 58.5558.592,021,740417  0% 1% 1% 100%
21Dart #2 75.1575.20256,184648  1% 0% 0% 100%
23Ruby JRuby 81.8481.892,052,508308  1% 1% 1% 100%
24C# Mono #6 85.1885.23377,268638  1% 0% 0% 100%
24C# Mono #2 85.2285.26354,356594  1% 0% 0% 100%
24C# Mono #7 86.2886.34437,208898  1% 0% 0% 100%
24Go #8 86.4386.461,154,804785  0% 1% 1% 100%
24F# Mono #4 86.6986.73985,876899  0% 1% 0% 100%
25F# Mono 86.8186.85789,980639  1% 0% 0% 100%
25Go #7 87.2087.241,060,660652  0% 1% 1% 100%
25F# Mono #3 88.2588.291,901,140870  1% 0% 0% 100%
25C# Mono 88.2688.31440,244624  0% 1% 1% 100%
26F# Mono #2 91.4091.44754,460413  0% 1% 1% 100%
40Go 143.24143.301,239,600733  0% 1% 1% 100%
172Smalltalk VisualWorks 10 min10 min362,756584  0% 0% 1% 100%
C CINT #2 Failed1099
C CINT Bad Output1101
Clojure #3 Failed710
Clojure #4 Failed707
Erlang HiPE Timed Out15 min622
JavaScript V8 Bad Output396
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.2Perl #7 4.114.13138,828567
1.2Perl #6 4.164.17188,248477
1.9Erlang HiPE #7 6.586.59198,3881198
2.3Java  #3 8.168.17268,0402084
6.1Pascal Free Pascal 21.6521.66111,8841199
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