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

Inline ArrayList's array into SmallSortedMap #17466

Closed
wants to merge 1 commit into from

Conversation

copybara-service[bot]
Copy link

Inline ArrayList's array into SmallSortedMap

Store them as Object[], because you can't have a Entry[], because Entry[] has a generic 'this' over <K, V>, you get error "generic array creation" if you try to make "new Entry[]".

And if you try to cast Object[] to Entry[], you get ClassCastException. So I've just made it an object array that we cast when reading out of.

This should save memory and improve performance, because we have fewer pointers to chase.

Store them as Object[], because you can't have a Entry[], because Entry[] has a generic 'this' over <K, V>, you get error "generic array creation" if you try to make "new Entry[]".

And if you try to cast Object[] to Entry[], you get ClassCastException. So I've just made it an object array that we cast when reading out of.

This should save memory and improve performance, because we have fewer pointers to chase.

PiperOrigin-RevId: 650117693
Copy link

Auto-closing Copybara pull request

@github-actions github-actions bot closed this Jul 22, 2024
@github-actions github-actions bot deleted the test_650117693 branch July 22, 2024 10:01
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.

None yet

1 participant
-