Req #62799 [Opn->Sus]: Parallel array processing
| From: | cmb@php.net | Date: | Fri, 26 Feb 2021 18:02:10 +0000 |
| Subject: | Req #62799 [Opn->Sus]: Parallel array processing | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-232404@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62799&edit=1
ID: 62799
Updated by: cmb@php.net
Reported by: info at ludwig-gramberg dot de
Summary: Parallel array processing
-Status: Open
+Status: Suspended
Type: Feature/Change Request
Package: Arrays related
Operating System: Any
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This is unlikely to happen for NTS builds. For ZTS builds you can
use the parallel extension[1] to build such functions in userland.
Anyhow, if you want to see this feature in php-src, please pursue
the RFC process[2]. For the time being, I'm suspending this
ticket.
[1] <http://pecl.php.net/parallel>
[2] <https://wiki.php.net/rfc/howto>
Previous Comments:
------------------------------------------------------------------------
[2012-08-12 18:38:45] info at ludwig-gramberg dot de
yes, array_walk, map and so on could all be done in parallel, which would be very
interesting speedwise
------------------------------------------------------------------------
[2012-08-12 13:01:35] laruence@php.net
s ,array_map,array_walk, :)
------------------------------------------------------------------------
[2012-08-12 13:01:01] laruence@php.net
do you mean something like array_map?
http://us2.php.net/manual/en/function.array-walk.php
------------------------------------------------------------------------
[2012-08-11 19:50:54] info at ludwig-gramberg dot de
Description:
------------
Idea: an easy to use parallel processing function for arrays (or any iterable
data structure).
Example:
<?php
$arr = array(1, 2, 3, 4);
array_process_parallel($arr, function($a) { return $a+5; });
?>
Now $arr would contain the following: [6, 7, 8, 9].
The values are written back to $arr. The parameter is called by reference.
Also a array_parallel_reduce would be nice.
Test script:
---------------
$arr = array(1, 2, 3, 4);
array_process_parallel($arr, function($a) { return $a+5; });
Expected result:
----------------
[6, 7, 8, 9]
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62799&edit=1