commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Monika Dhok (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COLLECTIONS-588) Redundant computation in CollectionBag and CollectionSortedBag
Date Mon, 02 May 2016 16:19:13 GMT
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)

Mime
View raw message