needforspeed: speed up unicode repeat, unicode string copy
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 7d11f7d..6f04a6d 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -5898,10 +5898,13 @@
p = u->str;
- while (len-- > 0) {
- Py_UNICODE_COPY(p, str->str, str->length);
- p += str->length;
- }
+ if (str->length == 1 && len > 0) {
+ Py_UNICODE_FILL(p, str->str[0], len);
+ } else
+ while (len-- > 0) {
+ Py_UNICODE_COPY(p, str->str, str->length);
+ p += str->length;
+ }
return (PyObject*) u;
}