Quote:
Originally Posted by ownedbycats
When short-circuiting is accounted for, would it maybe be faster to do two separate exact checks:
Code:
($#columnname=='foo'||$#columnname=='bar')
Than one regex match?
Code:
'^(foo|bar)$' in $#columnname
|
In this case and assuming that the first check is true a reasonable number of times, then yes because the == operator is much faster than the 'in' operator.