Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE #7667

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

DO NOT MERGE #7667

wants to merge 1 commit into from

Conversation

copybara-service[bot]
Copy link
Contributor

DO NOT MERGE

Demo of Guava changes for openjdk/jdk#23461.

This change pre-sizes collectors for which the size of the output collection must match the size of the input stream. It omits cases like ImmutableSet (which deduplicates), but it includes cases ImmutableList (obviously) and ImmutableMap/ImmutableBiMap (which rejects duplicate keys).

RELNOTES=collect: Changed toImmutableList, toImmutableMap, and toImmutableBiMap to internally pre-size their collections when possible.

Demo of Guava changes for openjdk/jdk#23461.

This change pre-sizes collectors for which the size of the output collection must match the size of the input stream. It omits cases like `ImmutableSet` (which deduplicates), but it includes cases `ImmutableList` (obviously) and `ImmutableMap`/`ImmutableBiMap` (which rejects duplicate keys).

RELNOTES=`collect`: Changed `toImmutableList`, `toImmutableMap`, and `toImmutableBiMap` to internally pre-size their collections when possible.
PiperOrigin-RevId: 725756865
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant