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 serhiy.storchaka, vstinner
Date 2015-10-14.00:42:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1444783348.44.0.280990123345.issue25399@psf.upfronthosting.co.za>
In-reply-to
Content
Optimize bytearray % args

Don't create temporary bytes objects: modify _PyBytes_Format() to create work
directly on bytearray objects.

* _PyBytesWriter: add use_bytearray attribute to use a bytearray buffer
* Rename _PyBytes_Format() to _PyBytes_FormatEx() just in case if something
  outside CPython uses it
* _PyBytes_FormatEx() now uses (char*, Py_ssize_t) for the input string, so
  bytearray_format() doesn't need tot create a temporary input bytes object
* Add use_bytearray parameter to _PyBytes_FormatEx() which is passed to
  _PyBytesWriter, to create a bytearray buffer instead of a bytes buffer
History
Date User Action Args
2015-10-14 00:42:29vstinnersetrecipients: + vstinner, serhiy.storchaka
2015-10-14 00:42:28vstinnersetmessageid: <1444783348.44.0.280990123345.issue25399@psf.upfronthosting.co.za>
2015-10-14 00:42:28vstinnerlinkissue25399 messages
2015-10-14 00:42:27vstinnercreate