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.0JavaScript V8 #2 3.523.52465,180373  1% 2% 1% 100%
1.5C++ g++ #2 5.335.34170,488695  0% 0% 1% 100%
1.5C++ g++ 5.355.36181,908648  1% 1% 1% 100%
1.5C gcc 5.375.38288,9842579  1% 1% 0% 100%
3.9C++ g++ #4 13.7813.7995,1721759  0% 1% 1% 100%
5.0Ada 2005 GNAT #5 17.5817.60171,7603492  0% 1% 1% 100%
5.6Lua #3 19.6919.71224,592669  0% 0% 0% 100%
6.3Java  #8 22.1222.13564,9521377  2% 1% 1% 100%
6.7Java  #7 23.4823.49564,7001284  0% 1% 1% 100%
6.8Python 3 #5 23.9223.94247,788424  0% 1% 1% 100%
6.8C gcc #4 23.9523.9683,0921525  1% 0% 0% 100%
6.8Ada 2005 GNAT #6 23.9623.98114,2203740  0% 1% 1% 100%
6.9Python 3 24.0424.16236,128478  0% 1% 1% 100%
7.1Java  #4 25.0825.09751,720921  1% 0% 0% 100%
7.2Java  #5 25.0225.34746,784929  1% 1% 0% 100%
7.5Scala #2 26.3226.34572,164668  1% 0% 0% 100%
7.5PHP #3 26.5026.52219,260459  1% 0% 0% 100%
7.6PHP 12.1126.62220,732788  0% 0% 0% 100%
7.6PHP #4 26.6826.70150,660832  0% 0% 0% 100%
8.0Haskell GHC #2 28.1828.19241,3721518  0% 0% 1% 100%
8.5Ruby #6 29.8329.84143,640442  0% 1% 1% 100%
8.6C gcc #2 30.2030.21125,8881099  0% 1% 1% 100%
8.6Lua #2 30.2330.25350,336596  0% 0% 0% 100%
8.6Scala #5 30.3930.41471,6641704  1% 1% 0% 100%
8.8Perl #2 30.8830.92140,068527  0% 0% 0% 100%
8.8C++ g++ #3 31.0231.03177,200844  0% 1% 1% 100%
9.8PHP #2 34.5834.60221,252449  0% 0% 0% 100%
9.9Java  #2 34.8034.82729,7241534  0% 1% 1% 100%
10Scala 35.6135.64835,408611  1% 0% 0% 100%
11Ruby #8 37.3137.34116,136529  0% 1% 1% 100%
11Ruby #5 37.3437.36152,664343  0% 1% 1% 100%
11Ruby #7 37.9437.97198,108507  1% 1% 1% 100%
11Erlang HiPE #6 38.7038.72169,8161058  1% 0% 0% 100%
11Racket 39.8839.91642,384527  0% 0% 1% 100%
12Rust 41.8441.87219,988763  1% 0% 0% 100%
12Lisp SBCL #3 42.5842.60611,6681948  0% 0% 1% 100%
12Lua 43.9043.94494,992437  0% 0% 0% 100%
13Ruby #2 44.3444.35260,120417  0% 1% 1% 100%
13Ruby #3 44.5744.61252,188501  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%
14Clojure #3 48.2548.31534,836710  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%
16Ruby JRuby #3 56.9657.012,025,596501  1% 1% 1% 100%
17Ruby JRuby #2 58.5558.592,021,740417  0% 1% 1% 100%
17Ruby 60.8760.89229,960308  0% 1% 1% 100%
19F# Mono #4 68.6268.651,140,656899  0% 1% 1% 100%
20F# Mono 69.3669.381,063,220639  0% 1% 1% 100%
20F# Mono #3 70.4570.482,326,496870  0% 1% 1% 100%
21C# Mono #2 73.1973.22375,576594  0% 1% 1% 100%
21Perl #4 73.3473.37188,720440  0% 0% 0% 100%
21C# Mono 73.9974.021,018,732624  0% 1% 1% 100%
21C# Mono #6 74.2574.29281,200638  0% 1% 0% 100%
21F# Mono #2 74.7774.801,585,168413  0% 1% 1% 100%
23Ruby JRuby 81.8481.892,052,508308  1% 1% 1% 100%
25Go #8 86.4386.461,154,804785  0% 1% 1% 100%
25Go #7 87.2087.241,060,660652  0% 1% 1% 100%
41Go 143.24143.301,239,600733  0% 1% 1% 100%
91Smalltalk VisualWorks 5 min5 min376,248584  0% 0% 0% 100%
C CINT #2 Failed1099
C CINT Bad Output1101
Clojure #4 Failed707
Dart #2 Timed Out1h 00 min648
Erlang HiPE Timed Out5 min622
Java  #6 Failed1410
JavaScript V8 Bad Output365
Lisp SBCL Timed Out5 min591
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.3Perl #7 4.394.41139,804567
1.3Perl #6 4.604.61189,608477
1.9Erlang HiPE #7 6.606.62194,0321198
2.3Java  #3 8.088.09265,8122084
6.2Pascal 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