Hi Dmitry,

On Mon, Jun 15, 2015 at 6:06 PM, Dmitry Stogov <dmi...@zend.com> wrote:

> I see only the test for "packed" array. You may create similar "hash"
> array, initializing it in reverse order.
>

It's better approach to see the difference because the array content is
basically the same.


>
> In my experiments "packed" arrays are slightly (8%) faster.
>
> $ sapi/cli/php packed.php
> Time: 0.022471189498901
> Time: 0.012310028076172
>
> $ sapi/cli/php hash.php
> Time: 0.024425029754639
> Time: 0.012874126434326


It's faster on my PC, too.
8% is good enough to have.
I'm surprised that PHP's hash is super fast :)

Regards,

--
Yasuo Ohgaki
yohg...@ohgaki.net

Reply via email to