mirror of
https://github.com/krahets/hello-algo.git
synced 2026-11-01 21:24:27 +08:00
docs: update Go map implementation for Go 1.24 (#1974)
* docs: update Go map implementation for Go 1.24 * docs: keep Swiss Table wording unlinked across translations * docs(ja): align open addressing terminology with the chapter
This commit is contained in:
@@ -105,4 +105,4 @@
|
||||
|
||||
- Python 采用开放寻址。字典 `dict` 使用伪随机数进行探测。
|
||||
- Java 采用链式地址。自 JDK 1.8 以来,当 `HashMap` 内数组长度达到 64 且链表长度达到 8 时,链表会转换为红黑树以提升查找性能。
|
||||
- Go 采用链式地址。Go 规定每个桶最多存储 8 个键值对,超出容量则连接一个溢出桶;当溢出桶过多时,会执行一次特殊的等量扩容操作,以确保性能。
|
||||
- Go 1.24 起,内置 `map` 默认采用基于 Swiss Table 的开放寻址实现。Go 1.23 及更早版本采用链式地址,每个桶最多存储 8 个键值对,超出容量时连接溢出桶。
|
||||
|
||||
Reference in New Issue
Block a user