Hi, I’m currently in the stage of tweaking my app for best performance, so I was wondering what’s fastest for the device to process: Local variables or flagged local variables?
For example I’ve got an object called Ball.
If Ball is good then I want to print “Hello”.
What’s fastest to do:
local ball = display.newImage("ball.png", 100, 100)
local ballGood = true
if(ballGood == true) then
display.newText("Hi", 200, 100)
end
or,
local ball = display.newImage("ball.png", 100, 100)
ball.isGood = true
if(ball.isGood == true) then
display.newText("Hi", 200, 100)
end
(This above code is obviously not used in my code, it’s just an illustration)
Thanks in advance, [import]uid: 14018 topic_id: 7400 reply_id: 307400[/import]