hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Poppleton (JIRA)" <j...@apache.org>
Subject [jira] Created: (HTTPCLIENT-907) Investigate implementation of expand() method in CharArrayBuffer
Date Sat, 16 Jan 2010 01:48:54 GMT
Investigate implementation of expand() method in CharArrayBuffer
----------------------------------------------------------------

                 Key: HTTPCLIENT-907
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-907
             Project: HttpComponents HttpClient
          Issue Type: Task
            Reporter: Tony Poppleton
            Priority: Minor


The CharArrayBuffer expand() method will sometimes double the size of the buffer array.

However looking at the source code for ArrayList in the Java utils package reveals that they
do:
   int newCapacity = (oldCapacity * 3)/2 + 1;

Would this be more efficient in CharArrayBuffer (in practice)?

The standard benchmarks should be run to ascertain if this is the case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message