fortest2.frink

View or download fortest2.frink in plain text format


// Timing test for a loop that actually *does* something in the body.

println["Starting timing loop."]

// Timing
limit = 10 million

for l = 1 to 10
{
   start = now[]

   for i = 1 to limit
      a = i + i

   end = now[]
   print["The loop took " + formatSig[(end-start), "seconds", 4]]
   println[".  This is " + formatSig[limit / (end-start), s^-1, 4] + " operations/sec."]
}


View or download fortest2.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 18015 days, 21 hours, 20 minutes ago.