Quick question to the memory buffs:
Which is better for optimum performance:
A)
Counter = 1, set maximum heath to 100
Counter = 2, set maximum health to 150
etc, etc
or
B)
Counter = 1, set maximum heath to 100
Limit condition (once every time it happens)
Counter = 2, set maximum health to 100
Limit condition (once every time it happens)
etc, etc
Obviously (A) will keep on firing as an event whereas (B) will fire once for each when it happens then stop checking.
So, what is better:
shorter code overall, but let MMF constantly test the event at runtime; or
longer code overall, but reduce what MMF is checking each cycle.
This is just a small scale example btw -I just generally want to start coding more efficiently - have there been any particularly good memory optimisation threads on the forums recently that spring to mind?