[issue21165] Optimize str.translate() for replacement with substrings and non-ASCII strings

2018-10-01 Thread STINNER Victor
STINNER Victor added the comment: > I actually have a patch (...) Please open a new issue, since that one is closed. You can reference this issue from your new issue. -- ___ Python tracker

[issue21165] Optimize str.translate() for replacement with substrings and non-ASCII strings

2018-09-30 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- nosy: +sir-sigurd ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21165] Optimize str.translate() for replacement with substrings and non-ASCII strings

2015-10-14 Thread STINNER Victor
STINNER Victor added the comment: This issue was more a reminder for myself, and I'm not more interested to implement this optimization. The method is already fast enough. -- resolution: -> out of date status: open -> closed ___ Python tracker

[issue21165] Optimize str.translate() for replacement with substrings and non-ASCII strings

2014-05-10 Thread Ezio Melotti
Ezio Melotti added the comment: Aren't there similar benchmarks in the benchmarks repo? If not, would it be reasonable to add this there? -- nosy: +ezio.melotti stage: - patch review ___ Python tracker rep...@bugs.python.org

[issue21165] Optimize str.translate() for replacement with substrings and non-ASCII strings

2014-04-07 Thread STINNER Victor
New submission from STINNER Victor: In issue #21118, I optimized str.translate() in Python 3.5 for ASCII 1:1 mapping and ASCII deletion. My optimization is not used if a character is replaced with a string (ex: abc.translate({ord('a'): xxx})) and for non-ASCII strings. translate_script.py is

[issue21165] Optimize str.translate() for replacement with substrings and non-ASCII strings

2014-04-07 Thread STINNER Victor
STINNER Victor added the comment: codecs.charmap_build() (PyUnicode_BuildEncodingMap()) creates a C array (a three-level trie) for fast lookup. It is used with codecs.charmap_encode() for 8-bit encodings. We may reuse it. -- ___ Python tracker

[issue21165] Optimize str.translate() for replacement with substrings and non-ASCII strings

2014-04-07 Thread Josh Rosenberg
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com: -- nosy: +josh.rosenberg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21165 ___ ___