/mobile Handheld Friendly website

 performance measurements

Each table row shows performance measurements for this JavaScript V8 program with a particular command-line input value N.

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
250,000579.88580.12214,832423  1% 0% 1% 100%
2,500,000Timed Out  423   

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.

 notes

V8 version 3.25.20 [console: dumb]

 k-nucleotide JavaScript V8 program source code

/* The Computer Language Benchmarks Game
   http://benchmarksgame.alioth.debian.org/

   Contributed by Jesse Millikan    
*/

// Return hash t with frequency in "n"
function frequency(seq, length){
 var m, i, t = {}, n = seq.length - length + 1

 for(i = 0; i < n; i++){
  m = seq.substr(i, length)
  t[m] = (t[m] || 0) + 1
 }

 t.n = n
 return t
}

function sort(seq, length){
 var f = frequency(seq, length), keys = [], k, i
 
 // Put all keys in key array in reverse
 for(k in f)
  if(k != 'n') keys.unshift(k)

 keys.sort(function(a, b){ return f[b] - f[a] })

 for(i in keys)
  print(keys[i].toUpperCase(), (f[keys[i]] * 100 / f.n).toFixed(3))

 print()
}

function find(seq, s){
 var f = frequency(seq, s.length)
 print((f[s] || 0) + "\t" + s.toUpperCase())
}

var seq="", l, others = ["ggt", "ggta", "ggtatt", "ggtattttaatt", "ggtattttaatttatagt"]

while(!readline().match(/^>THREE/)); // no body

while((l = readline()) && !l.match(/^>/))
 seq += l

sort(seq, 1)
sort(seq, 2)

for(i in others)
 find(seq, others[i])

 make, command-line, and program output logs

Thu, 20 Mar 2014 04:41:47 GMT

COMMAND LINE:
/usr/local/src/v8/out/native/d8 --nodebugger knucleotide.v8 -- 0 < knucleotide-input2500000.txt

TIMED OUT after 3600s


PROGRAM OUTPUT:

Revised BSD license

  Home   Conclusions   License   Play