TimurMahammadov / google-collections

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

Maps.uniqueIndex should size the new Map better #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Maps.uniqueIndex sizes the new collection based on the size of the list, when 
it should could call 
capacity on the list.

Line 508 should read
      newMap = new HashMap<K, V>(capacity(collection.size()));

Original issue reported on code.google.com by stevent...@gmail.com on 20 Jan 2008 at 4:57

GoogleCodeExporter commented 9 years ago
Also Sets.newHashSet (line 326) and newConcurrentHashSet should call 
Maps.capacity, or a new function in Sets 
that does what Maps.capacity does without the call to Math.max

Original comment by stevent...@gmail.com on 27 Jan 2008 at 10:24

GoogleCodeExporter commented 9 years ago

Original comment by kevin...@gmail.com on 30 Jan 2008 at 5:04

GoogleCodeExporter commented 9 years ago
fixed internally and should show up externally shortly.

Original comment by kevin...@gmail.com on 27 May 2008 at 6:49