You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/08/11 21:40:41 UTC

DO NOT REPLY [Bug 30604] New: - ArrayIntList.addAll() performance is terrible

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30604>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30604

ArrayIntList.addAll() performance is terrible

           Summary: ArrayIntList.addAll() performance is terrible
           Product: Commons
           Version: 1.0 Final
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Primitives
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: yuri@zip.com.au


ArrayIntList.addAll() does numerous resizes and individual sets.

Would be a lot better to 

a) ensure capacity at the start
b) check if the other list is ArrayIntList (high chance) and use System.arraycopy.

For now I have my own cut and pasted ArrayIntList that does both of these, performance is so much 
better its not funny.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org