This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients eric.smith, ztane
Date 2016-05-21.20:15:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463861728.34.0.240646145732.issue27078@psf.upfronthosting.co.za>
In-reply-to
Content
I considered doing this, and have some of it implemented. I discussed it with Larry Hastings and Mark Shannon at PyCon Ireland, and we decided to just use ''.format() and the new FORMAT_VALUE opcode, since that was the simplest way to fix the previous implementation's faults. That doesn't mean I've given up on improving it, of course.

The speed increase would indeed come from avoiding the LOAD_ATTR lookup, not building list, and not calling a function.

I'm curious about your benchmarks. Can you share them? I've found f-strings to be typically faster than .format(). But I can't say my benchmarks are particularly awesome.
History
Date User Action Args
2016-05-21 20:15:28eric.smithsetrecipients: + eric.smith, ztane
2016-05-21 20:15:28eric.smithsetmessageid: <1463861728.34.0.240646145732.issue27078@psf.upfronthosting.co.za>
2016-05-21 20:15:28eric.smithlinkissue27078 messages
2016-05-21 20:15:28eric.smithcreate