Message145372
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 |
|
Date |
User |
Action |
Args |
2011-10-11 23:14:19 | pitrou | set | recipients:
+ pitrou |
2011-10-11 23:14:19 | pitrou | set | messageid: <1318374859.38.0.809726887697.issue13155@psf.upfronthosting.co.za> |
2011-10-11 23:14:18 | pitrou | link | issue13155 messages |
2011-10-11 23:14:18 | pitrou | create | |
|