Since an if statement is already evaluated anyway, does adding an else statement have any effect on performance?
A practical example:
if(updateTime >= updateIncrement)
{
update();
updateTime = 0;
}
else
updateTime+=deltaTime;
vs:
if(updateTime >= updateIncrement)
{
update();
updateTime = -deltaTime;
}
updateTime+=deltaTime;
Aucun commentaire:
Enregistrer un commentaire