You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2012/08/02 02:29:18 UTC
[Bug 53637] New: performance problem in VectorSet.allAll()
https://issues.apache.org/bugzilla/show_bug.cgi?id=53637
Priority: P2
Bug ID: 53637
Assignee: notifications@ant.apache.org
Summary: performance problem in VectorSet.allAll()
Severity: normal
Classification: Unclassified
OS: Linux
Reporter: nistor1@illinois.edu
Hardware: PC
Status: NEW
Version: 1.8.4
Component: Core
Product: Ant
Created attachment 29149
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29149&action=edit
patch
There is a performance problem in VectorSet.allAll(). It appears in
version 1.8.4 and also in revision 1367821. I attached a test that
exposes this problem and a patch that fixes it. On my machine, the
patch provides a 20X speedup for this test.
To run the test, just do:
$ java Test
The output for the un-patched version is:
Time is 439
The output for the patched version is:
Time is 22
The current implementation of "VectorSet.addAll(int index, Collection
c)" adds the elements of "c" one by one at "index" in the
"elementData" array. These add operations are slow, because each of
them requires shifting to the right all the elements after "index".
The attached patch adds all the elements at once, and thus performs a
single shift.
The java.util.ArrayList "addAll(int index, Collection<? extends E> c)"
implementation also performs a single shift (like the patch), and does
not insert the elements one by one.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 53637] performance problem in VectorSet.allAll()
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53637
Adrian Nistor <ni...@illinois.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nistor1@illinois.edu
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 53637] performance problem in VectorSet.allAll()
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53637
Antoine Levy-Lambert <an...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|1.9.0 |1.9.1
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 53637] performance problem in VectorSet.allAll()
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53637
Jesse Glick <jg...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
--- Comment #2 from Jesse Glick <jg...@apache.org> ---
Did not make it into 1.9.0 but should be considered for 1.9.1.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 53637] performance problem in VectorSet.allAll()
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53637
Antoine Levy-Lambert <an...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|1.8.4 |1.9.0
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 53637] performance problem in VectorSet.allAll()
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53637
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |1.9.4
--- Comment #3 from Stefan Bodewig <bo...@apache.org> ---
svn revision 1554830
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 53637] performance problem in VectorSet.allAll()
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53637
--- Comment #1 from Adrian Nistor <ni...@illinois.edu> ---
Created attachment 29150
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29150&action=edit
test
--
You are receiving this mail because:
You are the assignee for the bug.