RFR: 8311517: Add performance information to ArrayList javadoc

dan1st duke at openjdk.org
Wed Aug 2 09:05:56 UTC 2023


On Wed, 26 Jul 2023 23:01:26 GMT, Stuart Marks <smarks at openjdk.org> wrote:

>> The [JEP for sequenced collections](https://openjdk.org/jeps/431) would add addFirst(), removeFirst() and reversed() methods to lists.
>> However, the Javadoc of List mentions:
>>  > The size, isEmpty, get, set, iterator, and listIterator operations run in constant time. The add operation runs in amortized constant time, that is, adding n elements requires O(n) time. All of the other operations run in linear time (roughly speaking). The constant factor is low compared to that for the LinkedList implementation.
>> 
>> This PR updates that Javadoc to factor in the new methods introduced by JEP 431.
>> 
>> https://bugs.openjdk.org/browse/JDK-8311517
>> https://mail.openjdk.org/pipermail/core-libs-dev/2023-June/107328.html
>> https://mail.openjdk.org/pipermail/core-libs-dev/2023-July/109637.html
>> 
>> This PR only affects documentation.
>
> Yes, that's correct. I'll create a CSR for this when the change settles down.

@stuart-marks Can you please create the CSR request as mentioned above or are there further changes I should do?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15040#issuecomment-1661820508


More information about the core-libs-dev mailing list