Integrated: 8311517: Add performance information to ArrayList javadoc
dan1st
duke at openjdk.org
Fri Aug 4 20:24:40 UTC 2023
On Wed, 26 Jul 2023 11:02:20 GMT, dan1st <duke 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.
This pull request has now been integrated.
Changeset: b463c6d3
Author: danthe1st <daniel at wwwmaster.at>
Committer: Stuart Marks <smarks at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/b463c6d3b0f27c8f124b5733cb9e7677542abe37
Stats: 6 lines in 1 file changed: 1 ins; 0 del; 5 mod
8311517: Add performance information to ArrayList javadoc
Reviewed-by: smarks, bpb
-------------
PR: https://git.openjdk.org/jdk/pull/15040
More information about the core-libs-dev
mailing list