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,0004.224.2349,984390  0% 1% 1% 100%
2,500,00039.4539.4876,928390  0% 1% 1% 100%
25,000,000393.64393.87358,236390  0% 1% 1% 100%

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.27.16 [console: dumb]

 k-nucleotide JavaScript V8 #3 program source code

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

   Contributed by Matthew Wilson
*/

var s="";while(!/^>TH/.test(readline()));for(var i;i=readline();s+=i);
var z,o={"ggt":3,"ggta":4,"ggtatt":6,"ggtattttaatt":12,"ggtattttaatttatagt":18};
function F(l,n,t){for(var m,i=0;i<n;++t[m=s.substring(i,++i+l-1)]||(t[m]=1));}
for(var l=1;l<3;++l) {
  var j,n=s.length-l+1,f={},keys=Array(Math.pow(4,l)),k,i=-1; F(l,n,f);
  for(k in f) keys[++i] = k; keys.sort(function(a, b){ return f[b] - f[a] });
  for(j=0;j<=i;print(keys[j].toUpperCase(),(f[keys[j++]]*100/n).toFixed(3)));
  print();
}
for(var i in o)F(z=o[i],s.length-z+1,z={}),print((z[i]||0)+"\t"+i.toUpperCase())

 make, command-line, and program output logs

Sun, 01 Jun 2014 19:26:37 GMT

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

PROGRAM OUTPUT:
A 30.295
T 30.151
C 19.800
G 19.754

AA 9.177
TA 9.132
AT 9.131
TT 9.091
CA 6.002
AC 6.001
AG 5.987
GA 5.984
CT 5.971
TC 5.971
GT 5.957
TG 5.956
CC 3.917
GC 3.911
CG 3.909
GG 3.902

1471758	GGT
446535	GGTA
47336	GGTATT
893	GGTATTTTAATT
893	GGTATTTTAATTTATAGT

Revised BSD license

  Home   Conclusions   License   Play