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.

    sort sortsort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0Rust #2 2.902.90181,704669  1% 2% 1% 100%
1.2JavaScript V8 #2 3.543.55432,072405  1% 0% 1% 100%
1.9C gcc 5.435.44293,2042579  1% 1% 0% 100%
1.9C++ g++ 5.495.50180,060648  1% 0% 0% 100%
1.9C++ g++ #2 5.525.53193,624695  1% 1% 0% 100%
5.2C++ g++ #4 15.1715.1894,5721759  1% 0% 1% 100%
6.6Ada 2005 GNAT #5 19.1119.13174,3603492  1% 2% 1% 100%
7.2Java  #7 20.7920.80567,4041284  0% 0% 1% 100%
7.2Java  #8 20.9520.97567,6561377  1% 0% 0% 100%
7.7Java  #6 22.2722.28571,8161410  2% 1% 1% 100%
7.7C gcc #4 22.4022.4185,1481525  1% 0% 0% 100%
7.7Ada 2005 GNAT #6 22.4422.47104,7043740  1% 0% 0% 100%
8.2Python 3 23.5623.68234,048478  1% 1% 0% 100%
8.2Python 3 #5 23.7623.78247,732424  0% 0% 1% 100%
8.3Java  #5 24.0524.07735,044929  1% 1% 0% 100%
8.4Java  #4 24.4624.48745,596921  1% 1% 0% 100%
8.5Scala #2 24.7824.80712,748668  0% 1% 1% 100%
8.8Perl #2 25.5725.60139,096527  0% 1% 1% 100%
9.3Scala #5 27.1027.11483,6561704  1% 1% 1% 100%
9.8PHP #3 28.5028.52210,868459  0% 0% 1% 100%
9.8PHP 12.9428.57219,256788  1% 1% 0% 100%
9.9Ruby #6 28.6228.63152,388442  0% 1% 1% 100%
9.9PHP #4 28.6228.65152,260832  1% 1% 0% 100%
10C gcc #2 29.6229.63127,7961099  0% 1% 1% 100%
11Lua #2 31.2631.27340,104596  0% 1% 1% 100%
11C++ g++ #3 31.7031.71180,708844  1% 1% 0% 100%
11Perl #4 32.3832.40142,656440  0% 1% 1% 100%
11Java  #2 33.0233.05762,6601534  1% 1% 0% 100%
12Haskell GHC #2 33.7633.78241,3401518  1% 0% 0% 100%
12Scala 34.0034.02853,952611  1% 1% 0% 100%
12Ruby #2 35.4135.43417,460417  0% 1% 1% 100%
12Erlang HiPE #6 35.9235.94177,0801058  0% 1% 1% 100%
12Ruby #3 36.0836.12381,520501  0% 1% 1% 100%
13Ruby #5 36.4236.43152,548343  0% 1% 1% 100%
13Ruby #8 36.4236.45104,100529  0% 0% 1% 100%
13Ruby #7 37.6337.66185,100507  0% 1% 1% 100%
14PHP #2 39.2939.30213,244449  0% 1% 0% 100%
14Racket 39.5139.53669,096527  0% 1% 0% 100%
15Lisp SBCL #3 43.1443.17605,3001948  0% 0% 1% 100%
16Lua 45.0045.03436,192437  0% 1% 1% 100%
17Ruby JRuby #5 48.7248.75798,716343  0% 1% 0% 100%
17Go #2 48.7848.80632,692789  1% 1% 1% 100%
17Ruby JRuby #7 49.3849.42894,612507  0% 1% 1% 100%
18Ruby JRuby #6 50.7850.81741,768442  0% 1% 1% 100%
18Ruby 51.2551.27428,144308  0% 0% 1% 100%
20Ruby JRuby #2 59.3159.362,019,808417  1% 4% 1% 100%
21Ruby JRuby #3 60.4160.452,018,296501  0% 0% 1% 100%
26Dart #2 75.1575.20256,184648  1% 0% 0% 100%
29C# Mono #2 84.8084.93455,160594  1% 0% 0% 100%
29C# Mono #6 85.2685.34437,176638  1% 0% 0% 100%
30C# Mono #7 85.9086.00428,632898  1% 0% 0% 100%
30F# Mono 87.6987.78782,864639  1% 0% 0% 100%
30C# Mono 87.9387.97456,012624  2% 1% 1% 100%
30Go #7 87.9888.02445,960652  1% 1% 0% 100%
30Go #8 88.2488.28508,252785  1% 2% 1% 100%
30F# Mono #2 88.4088.44794,904413  1% 0% 0% 100%
30F# Mono #3 88.4188.462,013,996870  1% 1% 0% 100%
31F# Mono #4 89.7089.831,051,104899  1% 0% 1% 100%
35Ruby JRuby 100.41100.471,960,544308  0% 1% 1% 100%
42Go 120.95121.00705,536733  0% 1% 1% 100%
210Smalltalk 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.4Perl #7 4.114.13138,828567
1.4Perl #6 4.164.17188,248477
2.3Erlang HiPE #7 6.586.59198,3881198
2.8Java  #3 8.168.17268,0402084
7.5Pascal 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