Guest User

Untitled

a guest
May 12th, 2020
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nim 0.49 KB | None | 0 0
  1.  stdout.writeLine now()
  2.     var toCalculate = [13548153810, 24265915380, 35143815420,
  3.                      41452967940, 52725472560, 63547825480,
  4.                      74936756240]
  5.     var start = getMonoTime()
  6.     # Result initialization
  7.     var futureResults = newSeq[Flowvar[seq[int64]]](toCalculate.len)
  8.  
  9.     time(overallTime):
  10.       for i in 0..6:
  11.         var number = toCalculate[i]
  12.         results[i] = newSeq[int64]()
  13.         futureResults[i] = spawn calculatePrimesOneThread(number,i)
Add Comment
Please, Sign In to add comment