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:19:13 UTC

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

Monika Dhok created COLLECTIONS-588:
---------------------------------------

             Summary: 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


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)