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 vstinner
Recipients loewis, mark.dickinson, pitrou, python-dev, serhiy.storchaka, vstinner
Date 2012-05-23.21:50:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1337809848.96.0.817790889027.issue14744@psf.upfronthosting.co.za>
In-reply-to
Content
faster-format.patch: Patch for Python 3.3 optimizing str%args and str.format(args), use _PyUnicodeWriter deeper in formatting. The patch uses different optimizations:

* if the result is just a string, copy the string by reference, don't copy it by value. It's not something new, this optimization was already used by the PyAccu API. Examples:

 - "{}".format(str)
 - "%s".format(str)

* avoid a temporary buffer to format integers (base 2, 8, 10, 16). Examples:

 - "decimal=%s".format(int)
 - "hex=%x".format(int)
 - "%o".format(int)
 - "{}".format(int)
 - "{:x}".format(int)

* don't overallocate the last argument of a format string. Example:

 - "x=%s".format("A" * 4096)
History
Date User Action Args
2012-05-23 21:50:49vstinnersetrecipients: + vstinner, loewis, mark.dickinson, pitrou, python-dev, serhiy.storchaka
2012-05-23 21:50:48vstinnersetmessageid: <1337809848.96.0.817790889027.issue14744@psf.upfronthosting.co.za>
2012-05-23 21:50:47vstinnerlinkissue14744 messages
2012-05-23 21:50:47vstinnercreate