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)