Skip to content

Commit

Permalink
update optimized dict
Browse files Browse the repository at this point in the history
  • Loading branch information
Chang-LeHung committed Mar 25, 2023
1 parent b563748 commit bcec3c2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion objects/09dict.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ dictkeys_get_index(const PyDictKeysObject *keys, Py_ssize_t i)
| **哈希表长度** | 能够保存的键值对数目 | **老版本** | **新版本** | **节约内存量(字节)** |
| :------------- | :-------------------- | :------------------- | :------------------------------- | :--------------------- |
| 8 | 8 * 2 / 3 = 5 | 24 * 8 = 192 | 1 * 8 + 24 * 5 = 128 | 64 |
| 256 | 256 * 2 / 3 = 170 | 24 * 256 = 6144 | 1 * 256 + 24 * 170 = 4336 | 1808 |
| 65536 | 65536 * 2 / 3 = 43690 | 24 * 65536 = 1572864 | 2 * 65536 + 24 * 43690 = 1179632 | 393232 |
Expand Down

0 comments on commit bcec3c2

Please sign in to comment.