The best way to avoid poor performance caused by multiple reallocations is to set the initial capacity to be the estimated size of the collection.

 
  • 避免因多次重新分配导致不佳性能的最佳方法是将初始容量设置为集合的估计的大小。
今日热词
目录 附录 查词历史