bkml wrote:
> First, there is no function call to check the application name for a 
> match in every turn of the loop. Context switches are rather expensive 
> and we avoid them altogether by not calling strcasecmp() anymore. 
> Secondly, instead of one test per character in the application name, we 
> now have only one single test per application entry to test the hash code.

That sounds great, but I have a couple of questions:

1) Will this extend to console commands (ie, command-line completion) or 
dialplan instructions only? For command-line completion, you would 
obviously still need the unhashed version of the command to compare and 
predict possible completions, since comparing a partial command will 
have no relation to the full command's hash.

2) What is the hash algorithm being used, and is a 32 bit hash too small 
(ie, collision-risky)?

That was three questions really...

On the issue of case sensitivity, the original Asterisk apps tend to use 
mixed case in documentation, ie "GotoIf". My preference would either be 
complete case insensitivity, or all lower-case. Case-sensitive, 
mixed-case is a stupid idea, that is bound to catch people out.
_______________________________________________
Openpbx-dev mailing list
[email protected]
http://lists.openpbx.org/mailman/listinfo/openpbx-dev

Reply via email to