[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

Demur Rumed report at bugs.python.org
Tue Jul 12 21:10:15 EDT 2016


Demur Rumed added the comment:

Benchmarked f'X is {x}' with BUILD_TUPLE change:

Before: 6.62 usec per loop
After: 6.33 usec per loop

f'X is {x} {x+2} {x+3}'
Before: 15.1 usec per loop
After: 14.7 usec per loop

Attached patch

----------
keywords: +patch
Added file: http://bugs.python.org/file43701/fstrtup.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27078>
_______________________________________


More information about the Python-bugs-list mailing list