Re: array_merge() vs array unpacking performance
| From: | David Rodrigues | Date: | Mon, 01 Aug 2022 20:47:53 +0000 |
| Subject: | Re: array_merge() vs array unpacking performance | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118341@lists.php.net to get a copy of this message | ||
> There are already a number of optimizations in array_merge. It might
depend on the actual test data that you used. Maybe a specific path needs
to be optimized. Please provide some more details.
You are right. I do not know how I tested before, but actually,
array_merge() is bit faster than array unpacking.
Atenciosamente,
David Rodrigues
Em seg., 1 de ago. de 2022 às 14:45, Kamil Tekiela <tekiela246@gmail.com>
escreveu:
> Hi David,
>
> It would be useful if you could provide your measurements and the way you
> arrived at such results. A quick test doesn't seem to support your
> findings: https://3v4l.org/v5m9f#v8.1.8
>
> There are already a number of optimizations in array_merge. It might
> depend on the actual test data that you used. Maybe a specific path needs
> to be optimized. Please provide some more details.
>
> Regards,
> Kamil
>