You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Monika Dhok (JIRA)" <ji...@apache.org> on 2016/05/02 18:21:12 UTC

[jira] [Updated] (COLLECTIONS-588) Redundant computation in CollectionBag and CollectionSortedBag

     [ https://issues.apache.org/jira/browse/COLLECTIONS-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Monika Dhok updated COLLECTIONS-588:
------------------------------------
    Attachment: Test1.java
                file.patch

> Redundant computation in CollectionBag and CollectionSortedBag
> --------------------------------------------------------------
>
>                 Key: COLLECTIONS-588
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-588
>             Project: Commons Collections
>          Issue Type: Bug
>            Reporter: Monika Dhok
>         Attachments: Test1.java, file.patch
>
>
> There appears to be redundant computations in "CollectionBag.retainAll"
> method in the version 4.4.1. I have attached a test and proposed a small 
> patch which ensures that "contains" method is called on hashset of
> input collection. This patch gives 892X speed up on my 
> machine for the provided test.
> Similar patches can be applied for, "CollectionSortedBag.retainAll".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)