[Chicago-talk] Which "if" structure is faster?

Jay Strauss me at heyjay.com
Sat Feb 21 10:59:33 CST 2004


Hi,

If I have some one time processing, then a endless loop (till the proc is
killed).  Which is faster or are they the same:

if ($firstTime) {
    ...stuff...
    $firstTime = 0;
}
else {
    ...stuff...
}


or


if (! $firstTime) {
    ...stuff...
}
else {
    ...stuff...
    $firstTime = 0;
}


Just curious
Jay




More information about the Chicago-talk mailing list