Thank you Andi and Andrei.
I have noticed that object method callbacks are consistently faster than
global function callbacks, and was wondering why:
1.3135770559311 seconds for 100000 runs - with no function callback
6.9758139848709 seconds for 100000 runs - with object method callback
7.9048730134964 seconds for 100000 runs - with global function callback
This is somewhat strange for me as I would expect objects to be slower if
it has to look up the class and then locate the function table?
I'm exploring hashes now. I find code like this in php_imap.c:
if (zend_hash_find(Z_ARRVAL_PP(envelope), "remail",
sizeof("remail"), (void **) &pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
env->remail=cpystr(Z_STRVAL_PP(pvalue));
}
Is that legal? It seems that it would alter the original array by forcing
conversion to string.
Lastly, I am trying to see the difference between zend_hash_find and
zend_hash_quick_find. Would I be correct in assuming quick_find only looks
at string keys, and it would be safe to use this if the function expects
only associative arrays?
Thanks again!
David
--
|> /+\ \| | |>
David Croft
Infotrek
On Thu, 26 Apr 2001, Andi Gutmans wrote:
> At 02:16 PM 4/26/2001 -0400, David Croft wrote:
>
> >Hello, I'm implementing an extension that allows user callbacks.
> >
> >The Zend API document suggests using the Compiler globals to access the
> >function table. However I see the XML extension is using Executor globals.
>
> During execution the correct table to use is the executor globals one,
> i.e., EG(function_table).
>
> Andi
>
>
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]