字典调整大小

时间:2013-02-28 10:18:24

标签: dictionary hashtable

在MSDN上的ConcurrentDictionary页面上,您可以找到以下评论:

// We know how many items we want to insert into the ConcurrentDictionary. 
// So set the initial capacity to some prime number above that, to ensure that 
// the ConcurrentDictionary does not need to be resized while initializing it. 
int NUMITEMS = 64;
int initialCapacity = 101;

为什么是素数?

0 个答案:

没有答案