RE: [PHP-DEV] array/HashTable filling optimization

2006-11-08 Thread Dmitry Stogov
The patch is fine. I applied it. Dmitry. -Original Message- From: Ilia Alshanetsky [mailto:[EMAIL PROTECTED] On Behalf Of Ilia Alshanetsky Sent: Tuesday, November 07, 2006 11:35 PM To: Matt Wilmas Cc: internals@lists.php.net; Dmitry Stogov Subject: Re: [PHP-DEV] array/HashTable

Re: [PHP-DEV] array/HashTable filling optimization

2006-11-07 Thread Ilia Alshanetsky
Looks like a good optimization to me. On 5-Nov-06, at 7:30 AM, Matt Wilmas wrote: Hi Nuno, Late reply, but I'm glad the idea was able to be used. :-) To the other hash people: While checking how Ilia made implode() faster in 5.2, I think I found another optimization that can be done.

Re: [PHP-DEV] array/HashTable filling optimization

2006-11-05 Thread Matt Wilmas
Hi Nuno, Late reply, but I'm glad the idea was able to be used. :-) To the other hash people: While checking how Ilia made implode() faster in 5.2, I think I found another optimization that can be done. In zend_hash_copy/merge, it seems the zend_hash_quick_* functions can be used instead for

[PHP-DEV] array/HashTable filling optimization

2006-09-27 Thread Matt W
Hi all, I noticed awhile ago how most every use of zend[_u]_hash_init has nSize as 0. Of course it isn't always known how many elements will be added to the array (nTableSize), but there are places where an accurate value could be used instead of getting the minimum default (8). For anyone who

Re: [PHP-DEV] array/HashTable filling optimization

2006-09-27 Thread Nuno Lopes
Aaahh nice catch ;) From a quick lookup in PHP sources I also found these functions were the same optimization can be applied: zend_default_exception_new_ex() - trivial convert_to_array() - not as easy as others zend_object_std_init() - possibly clone_wrapper_hash() - trivial