DittoTool opened a new pull request #92:
URL: https://github.com/apache/commons-codec/pull/92


   Hi,
   We find that there are three ArrayList objects which are not manipulated by 
random access. Due to the memory reallocation triggered in the successive 
insertions, the time complexity of add method of ArrayList is amortized O(1). 
We notice that these objects are only used for traversal and the retrieval for 
the first or the last element.
   
   This functionality can be implemented by LinkedList. Moreover, the insertion 
of LinkedList is strictly O(1) time complexity because no memory reallocation 
occurs.
   
   We discovered this inefficient usage of containers by our tool Ditto. The 
patch is submitted. Could you please check and accept it? We have tested the 
patch on our PC. The patched program works well.
   
   Bests
   
   Ditto


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to