Author: Carl Friedrich Bolz-Tereick <[email protected]>
Branch:
Changeset: r97481:db05162bc519
Date: 2019-09-15 14:16 +0200
http://bitbucket.org/pypy/pypy/changeset/db05162bc519/
Log: one less copy for slice with step
diff --git a/pypy/objspace/std/unicodeobject.py
b/pypy/objspace/std/unicodeobject.py
--- a/pypy/objspace/std/unicodeobject.py
+++ b/pypy/objspace/std/unicodeobject.py
@@ -726,7 +726,7 @@
i = 0
while True:
next_pos = rutf8.next_codepoint_pos(self._utf8, byte_pos)
- builder.append(self._utf8[byte_pos:next_pos])
+ builder.append_slice(self._utf8, byte_pos, next_pos)
if i == sl - 1:
break
i += 1
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit