You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Paolo Repele (JIRA)" <ji...@apache.org> on 2011/05/16 17:59:47 UTC

[jira] [Issue Comment Edited] (MATH-578) Decrease DescriptiveStatistics performance from 2.0 to 2.2

    [ https://issues.apache.org/jira/browse/MATH-578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034070#comment-13034070 ] 

Paolo Repele edited comment on MATH-578 at 5/16/11 3:57 PM:
------------------------------------------------------------

No Problem :)
* yep, the time was only for the getPercentile() method.
* I added an image where you can see the profile snapshot

Usually we use this library to analyze some grids. These grids can be very huge and can be generated using the same values for all the cells or a continue function around the grid or any combination of both.
Then we have really no idea how these grids can be generated.

      was (Author: paolo.repele):
    * yep, the time was only for the getPercentile() method.
* I added an image where you can see the profile snapshot

Usually we use this library to analyze some grids. These grids can be very huge and can be generated using the same values for all the cells or a continue function around the grid or any combination of both.
Then we have really no idea how these grids can be generated.
  
> Decrease DescriptiveStatistics performance from 2.0 to 2.2
> ----------------------------------------------------------
>
>                 Key: MATH-578
>                 URL: https://issues.apache.org/jira/browse/MATH-578
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: Linux
>            Reporter: Paolo Repele
>            Assignee: Mikkel Meyer Andersen
>            Priority: Minor
>         Attachments: percentile.png
>
>
> Switching between commons-math 2.0 to 2.2 we note how the
> DescriptiveStatistics.addValue(double) has decrease the performance.
> I tested with 2 million values.
> DescriptiveStatistics ds = new DescriptiveStatistics();
> for(int i = 0; i<1000*1000*2; i++) { //2 million values
>     ds.addValue(v);
> }
> ds.getPercentile(50);
> Seems that depending by the values inserted in the DescriptiveStatistics it takes different time:
> * with a single value (0)
> ** 2.0 -> take ~500 ms
> ** 2.2 -> take more than 10 minutes
> * with 50% fixed value (0) and 50% Math.random()
> ** 2.0 -> take ~500 ms
> ** 2.2 -> take ~250000 ms -> ~250 second
> * with 100% Math.random()
> ** 2.0 -> take ~500 ms
> ** 2.2 -> take ~70 ms

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira