Code: Select all
amount = 100000
x = 1000
y = 1000
a = 1000
b = 1000
c = 1000
StartTimer(1)
start = GetTimer(1)
For n = 0 To amount
x = Add(x, 1)
y = Add(y, 1)
a = Add(a, 1)
b = Add(b, 1)
c = Add(c, 1)
Next
Endtime = GetTimer(1)
timepassed = Endtime - start
TextOut(10, 10, "add time:"..timepassed)
start = GetTimer(1)
For n = 0 To amount
x = x + 1
y = y + 1
a = a + 1
b = b + 1
c = c + 1
Next
endtime = GetTimer(1)
timepassed = endtime - start
TextOut(10, 100, "x+x time:"..timepassed)
WaitLeftMouse()add time: 66
x + x time: 45
Which makes me wonder what is the point with those Add(), Div() etc. commands, if they just make the program slower, and are not as handy to use as x = x+1?