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 benjamin.peterson, pitrou, serhiy.storchaka, skrah, vstinner
Date 2012-03-20.14:04:47
SpamBayes Score 0.0013904999
Marked as misclassified No
Message-id <CAMpsgwbMoxpMmLjfQP2kjtR3eu=bqqng-dOh+2zzmY2tW2V7sg@mail.gmail.com>
In-reply-to <1332251424.74.0.552800434522.issue14249@psf.upfronthosting.co.za>
Content
> With my patch (attached) codecs.utf_16_be_decode runs 5% faster (on 32-bit Linux, I was not tested 64-bit). And of cause no pointers -- no aliasing warnings.

Your patch is wrong: you need to use & 0xffff to get lower 16 bits
when reading a UTF-16 unit. For example, (Py_UCS2)(block >> 32) should
be written (Py_UCS2)((block >> 32) & 0xffff).
History
Date User Action Args
2012-03-20 14:04:48vstinnersetrecipients: + vstinner, pitrou, benjamin.peterson, skrah, serhiy.storchaka
2012-03-20 14:04:48vstinnerlinkissue14249 messages
2012-03-20 14:04:47vstinnercreate