/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® one core |
Each table row shows performance measurements for this Ruby JRuby program with a particular command-line input value N.
| N | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| 250,000 | Failed | 421 |
Read the ↓ make, command line, and program output logs to see how this program was run.
Read k-nucleotide benchmark to see what this program should do.
jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on Java HotSpot(TM) Server VM 1.7.0_11-b21 [linux-i386]
# The Computer Language Benchmarks Game # http://benchmarksgame.alioth.debian.org # # contributed by jose fco. gonzalez # modified by Sokolov Yura seq = String.new def frecuency( seq,length ) n, table = seq.length - length + 1, Hash.new(0) f, i = nil, nil (0 ... length).each do |f| (f ... n).step(length) do |i| table[seq[i,length]] += 1 end end [n,table] end def sort_by_freq( seq,length ) n,table = frecuency( seq,length ) a, b, v = nil, nil, nil table.sort{|a,b| b[1] <=> a[1]}.each do |v| puts "%s %.3f" % [v[0].upcase,((v[1]*100).to_f/n)] end puts end def find_seq( seq,s ) n,table = frecuency( seq,s.length ) puts "#{table[s].to_s}\t#{s.upcase}" end line = STDIN.gets while line !~ /^>THREE/[ line = STDIN.gets while (line !~ /^>/) & line do seq << line.chomp line = STDIN.gets end [1,2].each {|i| sort_by_freq( seq,i ) } %w(ggt ggta ggtatt ggtattttaatt ggtattttaatttatagt).each{|s| find_seq( seq,s) }
Fri, 19 Apr 2013 16:53:56 GMT
MAKE:
mv knucleotide.jruby-2.jruby knucleotide.rb
0.01s to complete and log all make actions
COMMAND LINE:
/usr/local/src/jruby-1.7.3/bin/jruby -Xcompile.invokedynamic=true -J-server -J-Xmn512m -J-Xms2048m -J-Xmx2048m knucleotide.rb 0 < knucleotide-input250000.txt
PROGRAM FAILED
PROGRAM OUTPUT:
SyntaxError: knucleotide.rb:37: syntax error, unexpected kWHILE
while (line !~ /^>/) & line do
^