We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bed01e8 commit 1877a30Copy full SHA for 1877a30
1 file changed
Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-01-24-00.gh-issue-153234.xK9mPq.rst
@@ -0,0 +1,4 @@
1
+Optimize :meth:`dict.fromkeys` when the source iterable is a compact combined
2
+dict by cloning the underlying ``PyDictKeysObject`` in a single ``memcpy``
3
+and filling values in one pass, instead of calling ``insertdict()`` for every
4
+key. This avoids O(n) hash lookups and collision probing on the target dict.
0 commit comments