summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-01-27 00:40:47 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-01-27 00:49:39 +0300
commite2e663291dd1408cc9c5118d258a568470e32f8c (patch)
treec0e4419089fbedc97b91d530becaa54857606ea0 /esp8266
parent221f88d1f3f67640e72912ad8473782360b0e306 (diff)
downloadmicropython-e2e663291dd1408cc9c5118d258a568470e32f8c.tar.gz
micropython-e2e663291dd1408cc9c5118d258a568470e32f8c.zip
py/objstr: Optimize string concatenation with empty string.
In this, don't allocate copy, just return non-empty string. This helps with a standard pattern of buffering data in case of short reads: buf = b"" while ...: s = f.read(...) buf += s ... For a typical case when single read returns all data needed, there won't be extra allocation. This optimization helps uasyncio.
Diffstat (limited to 'esp8266')
0 files changed, 0 insertions, 0 deletions