Documentation ¶
Overview ¶
hashmap比golang内置的map添加速度要快,1000w数据hashmap比内置map快几百毫秒-1秒 删除速度也较快 内存占用由于hashmap实现的原因,在接近2^n但不到2^n时,hashmap占用空间较小,当hashmap扩容时(此时元素刚刚超过2^n,但是容量翻翻),hashmap会比内置map占用内存大。
Index ¶
Constants ¶
View Source
const ( DEFAULT_INITIAL_CAPACITY = 1 << 4 MAXIMUM_CAPACITY = 1 << 30 // 最大容量 DEFAULT_LOAD_FACTOR = 0.75 // 阈值比率 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.