Message196798
| Author |
lemburg |
| Recipients |
ezio.melotti, gvanrossum, kennyluck, lemburg, loewis, serhiy.storchaka, tchrist, vstinner |
| Date |
2013年09月02日.18:03:19 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<5224D2E5.2020204@egenix.com> |
| In-reply-to |
<1378140995.91.0.779939407113.issue12892@psf.upfronthosting.co.za> |
| Content |
On 02.09.2013 18:56, Serhiy Storchaka wrote:
>
> Oh, I were blind. Thank you Marc-Andre. Here is corrected patch. Unfortunately it 1.4-1.5 times slower on UTF-16 encoding UCS2 strings than previous wrong patch.
I think it would be faster to do this in two steps:
1. check the ranges of the input
2. do a memcpy() if there are no lone surrogates
Part 1 can be further optimized by adding a simple range
check (ch >= 0xd800). |
|