mirror of
https://github.com/corda/corda.git
synced 2025-02-09 20:31:18 +00:00
don't null out array in HashMap when size drops to zero
As in ArrayList, we want to avoid thrashing in cases where the map is frequently emptied and refilled.
This commit is contained in:
parent
adcac443e4
commit
6475beda83
@ -66,8 +66,6 @@ public class HashMap<K, V> implements Map<K, V> {
|
||||
private void shrink() {
|
||||
if (array.length / 2 >= MinimumCapacity && size <= array.length / 3) {
|
||||
resize(array.length / 2);
|
||||
} else if (size == 0) {
|
||||
resize(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user