ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 53821] New: IdentityStack.removeAll() is slow
Date Mon, 03 Sep 2012 15:30:21 GMT

          Priority: P2
            Bug ID: 53821
           Summary: IdentityStack.removeAll() is slow
          Severity: normal
    Classification: Unclassified
                OS: Linux
          Hardware: PC
            Status: NEW
           Version: 1.8.4
         Component: Core
           Product: Ant

Created attachment 29320

"IdentityStack.removeAll(Collection coll)" has the same performance
problem as the previously fixed Bug 53622 (for
"VectorSet.retainAll(Collection coll)").  The problem is that
"removeAll(Collection coll)" performs "coll.contains(", which
is slow if for example "coll" is a list.

I attached a patch similar to the one used by Jesse Glick in Bug
53622.  I also attached a test that exposes this problem.  For this
test, the patch provides a 97X speedup on my machine.

To run the test, just do:

$ java Test

The output for the un-patched version is:
Time is 2516

The output for the patched version is:
Time is 26

You are receiving this mail because:
You are the assignee for the bug.

View raw message