Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.2
-
None
-
None
-
Linux
Description
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
Attachments
Attachments
Issue Links
- is duplicated by
-
MATH-805 Percentile calculation is very slow when input data are constants
- Closed