Message270308
fstrtup2.patch is a bit more of an involved optimization for when we are joining 2 strings. Instead it emits BINARY_ADD. This may be considered too 'niche' since it only triggers when the substitution occurs at the start or end of a string & there is only one substitution
However, it reduces the "X is {x}" testcase on my machine to 4.9 usec
Interesting thing, to consider ceiling of what we can do,
Prefixing ./python -m timeit -s "x=1"
'%s'%x 1.08 usec
'%s'%(x,) 2.04 usec
str(x) 2.9 usec
f'{x}' 3.65 usec
So we should not be aiming to compete with %. It may be worthy to convert the code to generate "x is {}".format calls tho |
|
Date |
User |
Action |
Args |
2016-07-13 13:14:44 | Demur Rumed | set | recipients:
+ Demur Rumed, mjpieters, eric.smith, serhiy.storchaka, ztane |
2016-07-13 13:14:44 | Demur Rumed | set | messageid: <1468415684.65.0.295142600652.issue27078@psf.upfronthosting.co.za> |
2016-07-13 13:14:44 | Demur Rumed | link | issue27078 messages |
2016-07-13 13:14:44 | Demur Rumed | create | |
|