[RFR] [8u-JFR] 8238076: Fix OpenJDK 7 Bootstrap Broken by JFR Backport
Andrew John Hughes
gnu.andrew at redhat.com
Thu Jan 30 00:48:16 UTC 2020
On 29/01/2020 15:35, Martin Buchholz wrote:
>
>
> On Wed, Jan 29, 2020 at 12:28 AM Aleksey Shipilev <shade at redhat.com
> <mailto:shade at redhat.com>> wrote:
>
>
> Performance-wise, I think the only reason to prefer LinkedList over
> ArrayList if you do
> insertions/deletions in weird places (like, in the head). It almost
> never happens, so my goto
> performance optimization is usually a blind s/LinkedList/ArrayList/g :D
>
>
> Proper comparison would be LinkedList against ArrayDeque.
>
> LinkedList's best use case is a queue that spends most of its time
> empty; then LinkedList is the most space efficient.
True. I guess what I favoured here, in this rather toy example, was
constant allocation per element over an initial array allocation and
possible later resizing. Also, it's just worth stopping to consider
other collections sometimes, rather than just using ArrayList and
HashMap on auto-pilot :)
Anyway, pushed now:
https://hg.openjdk.java.net/jdk8u/jdk8u-jfr-incubator/hotspot/rev/429bb572ee65
Thanks,
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew
More information about the jdk8u-dev
mailing list