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

Gilles Sadowski commented on STATISTICS-54:
-------------------------------------------

bq. [...] accept the specific statistics [...] slows add operation because we 
are evaluating some conditionals [...]

Potentially yes, and quite certainly for small streams.  However, if the flags 
are "final", then hopefully the JIT compiler will remove the conditionals.  I 
would not worry (too much) about this kind of performance issue if the 
selection of statistics is a feature that we want.
A perhaps more serious issue is that a "merge" will not be possible between two 
instances if their selection of statistics was not the same...
Perhaps a more promising route is to split the feature set:
# High-level API ({{SummaryStatistics}}-like) that computes everything.
# Low-level utility functions that, given the current value of the statistics 
and new data (and possibly other pre-computed intermediate results), compute 
the new value.  Of course, if given inconsistent arguments, it will compute 
nonsense...


> [GSoC] Summary statistics API for Java 8 streams
> ------------------------------------------------
>
>                 Key: STATISTICS-54
>                 URL: https://issues.apache.org/jira/browse/STATISTICS-54
>             Project: Commons Statistics
>          Issue Type: Wish
>          Components: descriptive
>            Reporter: Alex Herbert
>            Priority: Minor
>              Labels: full-time, gsoc, gsoc2022, gsoc2023
>             Fix For: 1.0
>
>
> Placeholder for tasks that could be undertaken in this year's 
> [GSoC|https://summerofcode.withgoogle.com/].
> Ideas:
> - Design an updated summary statistics API for use with Java 8 streams based 
> on the summary statistic implementations in the Commons Math 
> {{stat.descriptive}} package including {{{}moments{}}}, {{rank}} and 
> {{summary}} sub-packages.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to