Concatenate strings in place if possible (GH-3451)
Optimized inplace operations for str/unicode so that they're genuinely done in place if no-one else needs the object. This is what CPython tries to do (and string concatenation was a point where it significantly beat Cython at times). This only works if the types are known at compile time, so with unknown types CPython will still be faster in some cases. Note: Uses slightly odd-macro trickery - does modify the input argument too (although only in places where it shouldn't matter).
Showing
Please register or sign in to comment