/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® one core |
Each table row shows performance measurements for this Ruby 2.0 program with a particular command-line input value N.
| N | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| 50,000 | 0.65 | 0.66 | 6,292 | 308 | 0% 0% 2% 99% |
| 500,000 | 5.96 | 5.96 | 26,088 | 308 | 0% 1% 0% 100% |
| 5,000,000 | 59.48 | 59.50 | 263,460 | 308 | 0% 0% 0% 100% |
Read the ↓ make, command line, and program output logs to see how this program was run.
Read regex-dna benchmark to see what this program should do.
ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]
# The Computer Language Benchmarks Game # http://benchmarksgame.alioth.debian.org # # contributed by jose fco. gonzalez seq = STDIN.readlines.join ilen = seq.size seq.gsub!(/>.*\n|\n/,"") clen = seq.length [ /agggtaaa|tttaccct/i, /[cgt]gggtaaa|tttaccc[acg]/i, /a[act]ggtaaa|tttacc[agt]t/i, /ag[act]gtaaa|tttac[agt]ct/i, /agg[act]taaa|ttta[agt]cct/i, /aggg[acg]aaa|ttt[cgt]ccct/i, /agggt[cgt]aa|tt[acg]accct/i, /agggta[cgt]a|t[acg]taccct/i, /agggtaa[cgt]|[acg]ttaccct/i ].each {|f| puts "#{f.source} #{seq.scan(f).size}" } { 'B' => '(c|g|t)', 'D' => '(a|g|t)', 'H' => '(a|c|t)', 'K' => '(g|t)', 'M' => '(a|c)', 'N' => '(a|c|g|t)', 'R' => '(a|g)', 'S' => '(c|t)', 'V' => '(a|c|g)', 'W' => '(a|t)', 'Y' => '(c|t)' }.each { |f,r| seq.gsub!(f,r) } puts puts ilen puts clen puts seq.length
Sun, 24 Feb 2013 20:01:34 GMT COMMAND LINE: /usr/local/src/ruby-2.0.0-p0/ruby regexdna.yarv 0 < regexdna-input5000000.txt PROGRAM OUTPUT: agggtaaa|tttaccct 356 [cgt]gggtaaa|tttaccc[acg] 1250 a[act]ggtaaa|tttacc[agt]t 4252 ag[act]gtaaa|tttac[agt]ct 2894 agg[act]taaa|ttta[agt]cct 5435 aggg[acg]aaa|ttt[cgt]ccct 1537 agggt[cgt]aa|tt[acg]accct 1431 agggta[cgt]a|t[acg]taccct 1608 agggtaa[cgt]|[acg]ttaccct 2178 50833411 50000000 66800214