[
https://issues.apache.org/jira/browse/MATH-473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981307#action_12981307
]
Dan Checkoway commented on MATH-473:
------------------------------------
@Patrick,
I could write my own class that doesn't use TreeMap for that matter. Sheer
performance is important to me here, so I don't want to use TreeMap at all, not
even with a no-op custom Comparator. I just don't want the added overhead of
any kind of sort. I don't use cumulative count or percentage methods.
If you don't think there are others who might benefit from an optionally
streamlined version of Frequency, then that's fine...I can write my own class.
I just figured the commons-math project might be interested in being home to
the variation so others could benefit from it.
> Frequency: new option: NON-sorted
> ---------------------------------
>
> Key: MATH-473
> URL: https://issues.apache.org/jira/browse/MATH-473
> Project: Commons Math
> Issue Type: Improvement
> Reporter: Dan Checkoway
>
> I have a request for enhancement on org.apache.commons.math.stat.Frequency.
> I would like to be able to specify that the the backing map NOT be sorted.
> Right now it uses TreeMap. I would like to have the option of specifying
> that sorting is not important, and would in fact hinder performance, and a
> plain old HashMap should be used instead.
> i.e. constructor such as:
> public Frequency(boolean sorted);
> If sorted is true, use a TreeMap. If sorted is false, use a HashMap. Is
> this feasible? I'd be happy to contribute a patch if that would help.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.