It's safe in most cases of List
and Map
initialization to make the List
or Map
with the following size params.
List(numElements + (numElements / 2));
Map(numElements + (numElements / 2));
this follows the .75 rule as well as saves a little overhead over the * 2
operation described above.