|
Strict
Framework Brl.StandardIO
Import Brl.Max2D
Import Brl.GLMax2D
Import Brl.GLGraphics
Import "PerfTest.s"
Import "..\AsLibs.a"
Import "PerfTest.o"
Extern
Function GccEntry() "C"
Function InitAsThread() "C"
Function AsEntry() "Win32"
EndExtern
Function LNKO(i, j)
While i <> j
If i > j Then i :- j..
Else j :- i
Wend
Return i
EndFunction
Print "BlitzMax:"
BeginPerf
Local Ret = 0
For Local i = 1 To 25000
For Local j = 1 To 25000
Ret :+ LNKO(i, j)
Next
Next
EndPerf
PrintInt Ret
Print
Print "Gcc:"
GccEntry
Print
Print "Anonymus:"
InitAsThread
AsEntry
Print
Global Ms
Function BeginPerf()
Ms = MilliSecs()
EndFunction
Function EndPerf()
Ms = MilliSecs() - Ms
Print "Time: " + String(Float(Ms) / 1000#)
EndFunction
Function PrintInt(x)
Print x
EndFunction
Function PrintLong(x:Long)
Print x
EndFunction
Function PrintDouble(x:Double)
Print x
EndFunction
Function NewLine()
Print
EndFunction
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.