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 pitrou
Recipients pitrou
Date 2011-10-11.23:14:17
SpamBayes Score 7.8910426e-07
Marked as misclassified No
Message-id <1318374859.38.0.809726887697.issue13155@psf.upfronthosting.co.za>
In-reply-to
Content
This patch optimizes scanning for the max character width in an unicode buffer.

Micro-benchmarking some worst case situations:

$ ./python -m timeit -s "x='é'+'x'*100000" "x[1:]"
-> before:
10000 loops, best of 3: 74.9 usec per loop
-> after:
100000 loops, best of 3: 15.5 usec per loop

$ ./python -m timeit -s "x='\U00010000'+'x'*100000" "x[1:]"
-> before:
10000 loops, best of 3: 138 usec per loop
-> after:
10000 loops, best of 3: 71.3 usec per loop
History
Date User Action Args
2011-10-11 23:14:19pitrousetrecipients: + pitrou
2011-10-11 23:14:19pitrousetmessageid: <1318374859.38.0.809726887697.issue13155@psf.upfronthosting.co.za>
2011-10-11 23:14:18pitroulinkissue13155 messages
2011-10-11 23:14:18pitroucreate