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:
Yudong Jin
2026-10-11 03:03:46 +08:00
committed by GitHub
parent 817a24d7ef
commit c2bc202a8d
5 changed files with 5 additions and 5 deletions

View File

@@ -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 个键值对,超出容量时连接溢出桶。