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 ethan.furman, serhiy.storchaka, vstinner
Date 2015-10-09.00:50:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Attached patch is a work-in-progress patch to use the new private _PyBytesWriter API in bytes % args.

The usage of the _PyBytesWriter API will allow further optimization. For example, it avoids the creation of a temporary bytes object to format b'%f' % 1.2.

The _PyBytesWriter API allocates a small buffer of 512 bytes on the stack to delay the allocation of the final bytes objects. It can avoid the need to call _PyBytes_Resize() completly, or at least reduce the number of calls.

See also the issue #25318 which added the _PyBytesWriter API.
Date User Action Args
2015-10-09 00:50:27vstinnersetrecipients: + vstinner, ethan.furman, serhiy.storchaka
2015-10-09 00:50:25vstinnersetmessageid: <>
2015-10-09 00:50:25vstinnerlinkissue25349 messages
2015-10-09 00:50:24vstinnercreate