Author vstinner
Recipients serhiy.storchaka, vstinner
Date 2015-10-14.00:42:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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
Date User Action Args
2015-10-14 00:42:29vstinnersetrecipients: + vstinner, serhiy.storchaka
2015-10-14 00:42:28vstinnersetmessageid: <>
2015-10-14 00:42:28vstinnerlinkissue25399 messages
2015-10-14 00:42:27vstinnercreate