in reply to Re: Using IF and OR, I'm sure there is a better way
in thread Using IF and OR, I'm sure there is a better way

This unfortunately is significantly longer to execute than the boolean OR. The grep has to test every value, whereas the if statement uses short-circuit boolean logic to stop testing values as soon as a match is found.
  • Comment on Re^2: Using IF and OR, I'm sure there is a better way

Replies are listed 'Best First'.
Re^3: Using IF and OR, I'm sure there is a better way
by ysth (Canon) on Dec 15, 2005 at 08:48 UTC
    "significantly"? Maybe a significant factor longer, but if the OP was even considering writing it in a long || ... || ... ||, there aren't enough elements to make it significant in absolute terms.