5

I'm looking for a comparison of initial list capacities for different languages and maybe even why those sizes were chosen. For example, I know that in Java 7 the default capacity of an ArrayList will be 10 (once you insert something). If possible, the factor at which the size increases would also be nice to know. For Java 7, that factor is 1.5.

I'm mainly interested in a few other popular languages especially Python.

Tavian Barnes
  • 12,477
  • 4
  • 45
  • 118
Justin Harris
  • 1,969
  • 2
  • 23
  • 33

1 Answers1

0

Python is 1.125 while Ruby is 1.5

gyz karma
  • 1
  • 2