Skip to content

Commit 00f502c

Browse files
committed
Add news and what's new.
1 parent e504a21 commit 00f502c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Doc/whatsnew/3.11.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,11 @@ Optimizations
404404
larger *k*).
405405
(Contributed by Serhiy Storchaka in :issue:`37295`.)
406406

407+
* Dict don't store hash value when all inserted keys are Unicode objects.
408+
This reduces dict size. For example, ``sys.getsizeof(dict.fromkeys("abcdefg"))``
409+
becomes 272 bytes from 352 bytes on 64bit platform.
410+
(Contributed by Inada Naoki in :issue:`46845`.)
411+
407412

408413
CPython bytecode changes
409414
========================
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Reduces dict size by removing hash value from hash table when all inserted
2+
keys are Unicode. For example, ``sys.getsizeof(dict.fromkeys("abcdefg"))``
3+
becomes 272 bytes from 352 bytes on 64bit platform.

0 commit comments

Comments
 (0)