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 serhiy.storchaka
Recipients RalfM, ezio.melotti, serhiy.storchaka, vstinner
Date 2016-08-02.18:53:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1470164031.45.0.134493175549.issue24214@psf.upfronthosting.co.za>
In-reply-to
Content
The patch slows down decoding up to 20%.

$ ./python -m timeit -s 'b = b"\xc4\x80"*10000' -- 'b.decode()'
Unpatched:  10000 loops, best of 3: 50.8 usec per loop
Patched:    10000 loops, best of 3: 63.3 usec per loop

And I'm not sure that fixing only for the surrogatepass handler is enough. Other standard error handlers look working, but what if a user handler consumes more then one byte?
History
Date User Action Args
2016-08-02 18:53:51serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, ezio.melotti, RalfM
2016-08-02 18:53:51serhiy.storchakasetmessageid: <1470164031.45.0.134493175549.issue24214@psf.upfronthosting.co.za>
2016-08-02 18:53:51serhiy.storchakalinkissue24214 messages
2016-08-02 18:53:50serhiy.storchakacreate