summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2019-12-18 06:51:22 (GMT)
committerInada Naoki <songofacandy@gmail.com>2019-12-18 06:51:22 (GMT)
commit75bb07e92baa7267a61056d03d7e6b475588e793 (patch)
treecb121c8bd4a5cf925359bdf4d1d591ec34528ae2 /Misc
parent50d4f12958bf806a4e1a1021d70cfd5d448c5cba (diff)
downloadcpython-75bb07e92baa7267a61056d03d7e6b475588e793.zip
cpython-75bb07e92baa7267a61056d03d7e6b475588e793.tar.gz
cpython-75bb07e92baa7267a61056d03d7e6b475588e793.tar.bz2
bpo-39028: Performance enhancement in keyword extraction (GH-17576)
All keywords should first be checked for pointer identity. Only after that failed for all keywords (unlikely) should unicode equality be used. The original code would call unicode equality on any non-matching keyword argument. Meaning calling it often e.g. when a function has many kwargs but only the last one is provided.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2019-12-17-23-20-51.bpo-39028.SND4TB.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-12-17-23-20-51.bpo-39028.SND4TB.rst b/Misc/NEWS.d/next/Core and Builtins/2019-12-17-23-20-51.bpo-39028.SND4TB.rst
new file mode 100644
index 0000000..ee7639e
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2019-12-17-23-20-51.bpo-39028.SND4TB.rst
@@ -0,0 +1 @@
+Slightly improve the speed of keyword argument parsing with many kwargs by strengthening the assumption that kwargs are interned strings. \ No newline at end of file