Bug #81590 [Opn]: trader_max and trader_min are performing very slow
| From: | cmb@php.net | Date: | Wed, 01 Dec 2021 13:26:26 +0000 |
| Subject: | Bug #81590 [Opn]: trader_max and trader_min are performing very slow | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-238086@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81590&edit=1
ID: 81590
Updated by: cmb@php.net
Reported by: marcus dot ruhnau at gmail dot com
Summary: trader_max and trader_min are performing very slow
Status: Open
Type: Bug
-Package: Trader
+Package: *General Issues
Operating System: CENTOS 7
PHP Version: 8.0.12
Block user comment: N
Private report: N
New Comment:
You might be better off to report that at
<https://github.com/php/pecl-math-trader/issues>.
Previous Comments:
------------------------------------------------------------------------
[2021-11-04 13:52:40] marcus dot ruhnau at gmail dot com
Description:
------------
I tried to do multiple calculations on AAPL chart (closeprice) and always tried to get the last 50
bars. I took nearly 5 seconds for the calculation. The other functions in trader extention are much,
much faster.
Just wanted to get a range (Max and Min) from if a stock price is stable
Test script:
---------------
in a very simple for loop of the array data
I have data from 1980
$maximum = trader_max($highing,50)[$i];
$minimum = trader_min($lowing,50)[$i];
Actual result:
--------------
The result is correct, but the time required is too long
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81590&edit=1