[issue37348] Optimize PyUnicode_FromString for short ASCII strings

2019-06-24 Thread Inada Naoki
Inada Naoki added the comment: This optimization is only for short strings. There is no significant difference for long and non-ASCII strings. ``` # 1000 ASCII $ ./python -m pyperf timeit --compare-to=./python-master -s 'b=b"f"*1000' -- 'b.decode()' python-master: . 196

[issue37348] Optimize PyUnicode_FromString for short ASCII strings

2019-06-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please measure the performance for long strings (1000, 1 and 10 characters): a long ASCII string and a long ASCII string ending with a non-ASCII character? -- ___ Python tracker

[issue37348] Optimize PyUnicode_FromString for short ASCII strings

2019-06-23 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37348] Optimize PyUnicode_FromString for short ASCII strings

2019-06-23 Thread Inada Naoki
Inada Naoki added the comment: New changeset 770847a7db33b3d4c451b42372b6942687aa6121 by Inada Naoki in branch 'master': bpo-37348: optimize decoding ASCII string (GH-14283) https://github.com/python/cpython/commit/770847a7db33b3d4c451b42372b6942687aa6121 --

[issue37348] Optimize PyUnicode_FromString for short ASCII strings

2019-06-21 Thread STINNER Victor
STINNER Victor added the comment: I'm confused by the issue title: PyUnicode_GetString() doesn't exist, it's PyUnicode_FromString() :-) I changed the title. -- title: Optimize PyUnicode_GetString for short ASCII strings -> Optimize PyUnicode_FromString for short ASCII strings