User Tools

Site Tools


notes:comporg:projects:pnc1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:comporg:projects:pnc1 [2018/02/01 05:46] – [Project: IMPLEMENTATIONS AND OPTIMIZATIONS - PRIME NUMBER COMPUTATION (pnc1)] bschultenotes:comporg:projects:pnc1 [2018/02/06 13:41] (current) – [Project: IMPLEMENTATIONS AND OPTIMIZATIONS - PRIME NUMBER COMPUTATION (pnc1)] bstrong2
Line 162: Line 162:
 require "benchmark" require "benchmark"
  
-time = Benchmark.realtime.do+time = Benchmark.realtime do
  
 // insert prime calculation code here // insert prime calculation code here
Line 259: Line 259:
  
 <code> <code>
-startM = new Date().getMilliseconds(); +var start = new Date().getTime(); 
-startS = new Date().getSeconds();+
  
 -Pnc1 code- -Pnc1 code-
  
-endM = new Date().getMilliseconds(); +var end = new Date().getTime(); 
-endS new Date().getSeconds(); + 
-totalTime = endM - startM; +var time = (end-start)/1000;
-seconds = endS - startS;+
  
-totalTime /= 10000; +console.log(time);
-totalTime += seconds; +
-console.log(totalTime);+
 </code> </code>
  
notes/comporg/projects/pnc1.1517464009.txt.gz · Last modified: 2018/02/01 05:46 by bschulte