Bug #75533 [Com]: array_reduce is slow when $carry is large array
| From: | martin dot ninov at gmail dot com | Date: | Mon, 17 Sep 2018 13:46:31 +0000 |
| Subject: | Bug #75533 [Com]: array_reduce is slow when $carry is large array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-217098@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75533&edit=1
ID: 75533
Comment by: martin dot ninov at gmail dot com
Reported by: manabu dot matsui at gmail dot com
Summary: array_reduce is slow when $carry is large array
Status: Open
Type: Bug
Package: Performance problem
Operating System: macOS 10.13.1
PHP Version: 7.1.11
Block user comment: N
Private report: N
New Comment:
This still exists in php 7.2.9.
It's been almost a year, and there's even a PR, can we get a move on with the fix?
Previous Comments:
------------------------------------------------------------------------
[2017-11-16 04:31:07] manabu dot matsui at gmail dot com
Description:
------------
array_reduce is slow when $carry is very large array and return it with some modification.
My test script is test_array_reduce.php at https://gist.github.com/crhg/45c1f73ca59c9b0f6274412019b19fca
I replaced array_reduce with simple pure php implementation, it runs fast.
Script of this case is test_my_reduce.php.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75533&edit=1