[OpenSER-Users] About efficiency in conditionals
    Iñaki Baz Castillo 
    ibc at in.ilimit.es
       
    Tue Oct 16 15:03:21 CEST 2007
    
    
  
Hi, I'm wondering which solution (A or B) is more efficient in case method is 
NOT an INVITE:
A)  if ( (method=="INVITE") && (isflagset(5) || isbflagset(6)) )
B)  if ( mehtod=="INVITE" )
My question is: Is faster B because does less comparasions?
or does OpenSer break A conditional during first condition (method=="INVITE") 
because it's false so then A and B are equally efficient?
And which is more efficient (C or D) when all the conditions are true?
C)  if ( (method=="INVITE") && (isflagset(5) || isbflagset(6)) ) {
              ....
D)  if ( method=="INVITE" ) {
             if ( (isflagset(5) || isbflagset(6)) ) {
                      ...
Thanks for any explanation.
Best regards.
-- 
Iñaki Baz Castillo
ibc at in.ilimit.es
    
    
More information about the Users
mailing list