php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81590 trader_max and trader_min are performing very slow
Submitted: 2021-11-04 13:52 UTC Modified: 2021-12-01 13:26 UTC
From: marcus dot ruhnau at gmail dot com Assigned:
Status: Open Package: PECL (PECL)
PHP Version: 8.0.12 OS: CENTOS 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: marcus dot ruhnau at gmail dot com
New email:
PHP Version: OS:

 

 [2021-11-04 13:52 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-12-01 13:26 UTC] cmb@php.net
-Package: Trader +Package: *General Issues
 [2021-12-01 13:26 UTC] cmb@php.net
You might be better off to report that at
<https://github.com/php/pecl-math-trader/issues>.
 [2021-12-01 13:26 UTC] cmb@php.net
-Package: *General Issues +Package: PECL
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 18:01:30 2024 UTC