Bug #75533 [Com]: array_reduce is slow when $carry is large array
| From: | manabu dot matsui at gmail dot com | Date: | Tue, 18 Sep 2018 05:40:27 +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-217105@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: manabu dot matsui 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:
Since PR #2931 conflicted with changes to fix #76778, I updated it.
Previous Comments:
------------------------------------------------------------------------
[2018-09-17 13:46:31] martin dot ninov at gmail dot com
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?
------------------------------------------------------------------------
[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