DaveAKing / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Allow specification of underlying array size in Immutable Builders #1598

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice if for immutable map/set/list you could specify the initial 
array size. When calling build() that array could then be used if the array is 
full. This would reduce object churn.

This would mean that build() can only be called one per Builder. I am unsure if 
this goes against the pattern here, but thought this would be a nice cheap 
optimization, and is a standard pattern in the JRE collections.

Original issue reported on code.google.com by matthew....@import.io on 2 Dec 2013 at 2:52

GoogleCodeExporter commented 9 years ago

Original comment by cpov...@google.com on 2 Dec 2013 at 2:54

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<issue id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:10

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08