makes sense. thanks :) Dmitry.
On Wed, Oct 23, 2013 at 5:52 PM, Nikita Popov <nikita....@gmail.com> wrote: > On Wed, Oct 23, 2013 at 2:36 PM, Dmitry Stogov <dmi...@zend.com> wrote: > >> Hi, >> >> I'm proposing two simple patches that eliminate a lot of useless zval >> copying. >> For example they remove only about 800 calls to zend_hash_copy() (25%) on >> each request to wordpress-3.6.0 home page and make it 2-4% faster. >> >> It's not a questions about master branch, but I think it is also safe to >> commit them into PHP-5.4 and PHP-5.5. >> >> Any objections? >> >> https://gist.github.com/dstogov/7117623 >> >> https://gist.github.com/dstogov/7117649 >> >> Thanks. Dmitry. >> > > No objection, just quick note on func_get_args patch: You can use > SEPARATE_ARG_IF_REF there, so the code in the loop body is: > > zval *arg = *(p-(arg_count-i)); > SEPARATE_ARG_IF_REF(arg); > zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &arg, > sizeof(zval *), NULL); > > Nikita >