fortest2.frink

Download or view 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."]
}


Download or view 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 20217 days, 23 hours, 33 minutes ago.