Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local i2 = 0
- local runNum = 10000000
- local tm = tick()
- for i=1, runNum do
- i2 = i < 0 and i * -1 or i
- end
- print("test 1", tick() - tm)
- local tm = tick()
- for i=1, runNum do
- i2 = i < 0 and -i or i
- end
- print("test 2", tick() - tm)
- local tm = tick()
- for i=1, runNum do
- if i < 0 then i2 = -1 else i2 = i end
- end
- print("test 3", tick() - tm)
Advertisement
Add Comment
Please, Sign In to add comment