Mark_Stradling_
Jul 01, 2010Cirrus
Case Statement Efficiency
Hello,
I'm rewriting very messy iRules. Currently, they are all if / elseif statements which I am converting to switch statements. Upon going through the rule, I realized that a number of various statments send traffic to the same pool but they are split up. Would it be more efficient to group these together.
Current example:
conditions 1a, 1b, 1c
pools 1
case 1a then
pool 1
case 1b then
pool 1
case 1c then
pool 1
Would it be more efficient to do this:
case (regexp) 1a | 1b | 1c
pool 1
Thanks!