為什么hashmap以2的倍數作為桶的長度,同時以2作為擴容倍數 1 h%n==h&(n-1) 增加運算速度 2 使hash分布更均勻 HashMap源碼解析筆記 3 擴容時僅需要多比較1個bit: if ((e.hash & o ...