Also see https://github.com/openjdk/jdk/pull/15614, which removes caching
in `AbstractMap` etc, meaning once Valhalla is out, the anonymous set will
be a value object with no overhead. In addition, hotspot already has an
escape analysis mechanism which can optimize iterators to index for loops
if i
See: https://bugs.openjdk.org/browse/JDK-8193128
Jason
From: core-libs-dev on behalf of Ryan Ernst
Sent: Friday, February 2, 2024 1:42 PM
To: core-libs-dev@openjdk.org
Subject: Object creation from iterating Map.of()/Set.of()/List.of()
The newer “of” methods i