RFR: 8311517: Add performance information to ArrayList javadoc
dan1st
duke at openjdk.org
Thu Jul 27 06:31:06 UTC 2023
On Wed, 26 Jul 2023 21:59:41 GMT, Stuart Marks <smarks at openjdk.org> wrote:
> Regarding the text of the change: should getFirst() and getLast() be mentioned? They were added by Sequenced Collections, and they run in constant time. Also, while add() and addLast() run in amortized constant time (because of the possibility of array growth) removeLast() runs in absolute constant time; it never copies or reallocates the array.
I fully agree with that and made the requested changes.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15040#issuecomment-1652985173
More information about the core-libs-dev
mailing list