summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-06-24 03:30:24 (GMT)
committerGitHub <noreply@github.com>2019-06-24 03:30:24 (GMT)
commit770847a7db33b3d4c451b42372b6942687aa6121 (patch)
tree04aaf3163636bed947763435ad03a76b6f211d7b /Misc
parentb3ca7972c8d8c6479b6542ce28e0f7a6ebd5b8fe (diff)
downloadcpython-770847a7db33b3d4c451b42372b6942687aa6121.zip
cpython-770847a7db33b3d4c451b42372b6942687aa6121.tar.gz
cpython-770847a7db33b3d4c451b42372b6942687aa6121.tar.bz2
bpo-37348: optimize decoding ASCII string (GH-14283)
`_PyUnicode_Writer` is a relatively complex structure. Initializing it is significant overhead when decoding short ASCII string.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2019-06-23-00-26-30.bpo-37348.pp8P-x.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-06-23-00-26-30.bpo-37348.pp8P-x.rst b/Misc/NEWS.d/next/Core and Builtins/2019-06-23-00-26-30.bpo-37348.pp8P-x.rst
new file mode 100644
index 0000000..5859837
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2019-06-23-00-26-30.bpo-37348.pp8P-x.rst
@@ -0,0 +1,2 @@
+Optimized decoding short ASCII string with UTF-8 and ascii codecs.
+``b"foo".decode()`` is about 15% faster. Patch by Inada Naoki.