-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. Also fixed some warnings about unnecessary unchecked suppressions, and type-name should end with T. PiperOrigin-RevId: 658585983
- Loading branch information
1 parent
58a97a4
commit 910f627
Showing
1 changed file
with
69 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters