Actually it is a performance difference between:

(method == "INVITE") does a string comparison, so slower

(is_method("INVITE")) does an ID/integer comparison, so faster

Regards,
Bogdan

Brett Nemeroff wrote:
> I *think* programing style. :)
>
> I'd be interested in knowing if there is a performance improvement for 
> one versus the other.
> -Brett
>
>
> On Fri, May 1, 2009 at 10:21 AM, Michael Ciupka 
> <[email protected] <mailto:[email protected]>> wrote:
>
>     Hello,
>
>
>     what are the difference between the two commands:
>     1. if (method == "INVITE")
>     2. if (ismethod("INVITE"))
>
>     i hope somebody can help me.
>
>     Regards
>     Michael
>
>     _______________________________________________
>     Users mailing list
>     [email protected] <mailto:[email protected]>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to