Jump to content

Recommended Posts

Posted (edited)

it seems i fall victim of too mach forums reading and my laziness, sorry - just tested it myself:

$n = 100000
$x = 777
$e = 0

$t = TimerInit()
For $i = 1 To $n
    If $x <> 888 Then
        $e = 1
    Else
        $e = 0
    EndIf
Next
$dt1 = TimerDiff($t)

$t = TimerInit()
For $i = 1 To $n
    ($x <> 888) ? $e = 0 : $e = 1
Next
$dt2 = TimerDiff($t)

ConsoleWrite("$dt1 = " & $dt1 & @CRLF &"$dt2 = " & $dt2 & @CRLF & "$dt2/$dt1 % = " & ($dt1-$dt2)/$dt1*100 & @CRLF)

i get :

--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
$dt1 = 53.5020512383557
$dt2 = 42.9741768856098
$dt2/$dt1 % = 19.6775153644922
Edited by Iczer

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...