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 kristjan.jonsson, loewis, pitrou, python-dev, serhiy.storchaka, vstinner
Date 2012-05-03.22:08:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1336082896.6.0.108889213788.issue14716@psf.upfronthosting.co.za>
In-reply-to
Content
I just added a new "unicode_writer" API for the issue #14687 (Optimize str%tuple for the PEP 393) which helps to make "str%tuple" between 25% and 30% faster.

Attached patch replaces PyAccu API with the unicode_writer API for str.format().

Python 3.2:

1000000 loops, best of 3: 0.198 usec per loop
100000 loops, best of 3: 11.3 usec per loop
10000000 loops, best of 3: 0.167 usec per loop
1000000 loops, best of 3: 0.494 usec per loop

Python 3.3:

1000000 loops, best of 3: 0.293 usec per loop
10000 loops, best of 3: 20.2 usec per loop
1000000 loops, best of 3: 0.219 usec per loop
1000000 loops, best of 3: 0.909 usec per loop

Python 3.3 + patch (speed up of the patch):

1000000 loops, best of 3: 0.226 usec per loop (-22%)
100000 loops, best of 3: 14.8 usec per loop (-26%)
1000000 loops, best of 3: 0.219 usec per loop (0%)
1000000 loops, best of 3: 0.658 usec per loop (-27%)
History
Date User Action Args
2012-05-03 22:08:17vstinnersetrecipients: + vstinner, loewis, pitrou, kristjan.jonsson, python-dev, serhiy.storchaka
2012-05-03 22:08:16vstinnersetmessageid: <1336082896.6.0.108889213788.issue14716@psf.upfronthosting.co.za>
2012-05-03 22:08:15vstinnerlinkissue14716 messages
2012-05-03 22:08:15vstinnercreate