This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:comporg:projects:pnc1 [2018/02/01 05:44] – [Project: IMPLEMENTATIONS AND OPTIMIZATIONS - PRIME NUMBER COMPUTATION (pnc1)] bschulte | notes:comporg:projects:pnc1 [2018/02/06 13:41] (current) – [Project: IMPLEMENTATIONS AND OPTIMIZATIONS - PRIME NUMBER COMPUTATION (pnc1)] bstrong2 | ||
---|---|---|---|
Line 74: | Line 74: | ||
- | *Go*// | + | **Go** \\ |
< | < | ||
- | *Lua* // | + | **Lua** \\ |
< | < | ||
- | *Python3*// | + | **Python3**\\ |
I don't know for sure if this works for Python2 | I don't know for sure if this works for Python2 | ||
< | < | ||
Line 162: | Line 162: | ||
require " | require " | ||
- | time = Benchmark.realtime.do | + | time = Benchmark.realtime do |
// insert prime calculation code here | // insert prime calculation code here | ||
Line 259: | Line 259: | ||
< | < | ||
- | startM | + | 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); | + | |
</ | </ | ||