Message252322
| Author | vstinner |
|---|---|
| Recipients | ezio.melotti, serhiy.storchaka, vstinner |
| Date | 2015-10-05.12:01:28 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1444046488.88.0.905297361267.issue25318@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Attached patch is the first step to optimize Unicode encoders: it adds a _PyBytesWriter API. This API is responsible to use the most efficient buffer depending on the need: * it's possible to use a small buffer directly allocated on the C stack * otherwise a Python bytes object is allocated * it's possible to overallocate the bytes objcet to reduce the number of calls to _PyBytes_Resize() The patch only adds the new API, don't expect any speed up. I just added a small optimization: the overallocation is disabled in UCS1 encoder (ASCII and Latin1) for the last write. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2015-10-05 12:01:28 | vstinner | set | recipients: + vstinner, ezio.melotti, serhiy.storchaka |
| 2015-10-05 12:01:28 | vstinner | set | messageid: <1444046488.88.0.905297361267.issue25318@psf.upfronthosting.co.za> |
| 2015-10-05 12:01:28 | vstinner | link | issue25318 messages |
| 2015-10-05 12:01:28 | vstinner | create | |