there is some code to execute after validation.
consider a variable SOQualityStandards = true;
this variable is validated before the execution of code.
i have come across two ways of checking SOQualityStandards
one is
if(SOQualityStandards)
{
//code to execute
}
and the other is
if(!SOQualityStandards) return;
//code to execute
is there any performance difference between both. which one should i consider.
They have the same semantics (assuming there is no other code in the function after the if-block in the first example).
I find the first to be clearer, but that is a matter of personal preference.