[issue15026] Faster UTF-16 encoding

2012-06-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Thank you for pushing. :-) Are you interested in a faster UTF-32 codec? Not much :) I know you posted issues on that, but I think UTF-32 is quite low priority. -- ___ Python tracker

[issue15026] Faster UTF-16 encoding

2012-06-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for pushing. :-) Are you interested in a faster UTF-32 codec? -- ___ Python tracker ___ __

[issue15026] Faster UTF-16 encoding

2012-06-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 35667fc5f785 by Antoine Pitrou in branch 'default': Mention the UTF-16 encoding speedup in the whatsnew (issue #15026). http://hg.python.org/cpython/rev/35667fc5f785 -- ___ Python tracker

[issue15026] Faster UTF-16 encoding

2012-06-15 Thread STINNER Victor
STINNER Victor added the comment: It would be nice to mention the improvement in the What's New in Python 3.3 doc (Optimizations section). -- ___ Python tracker ___ ___

[issue15026] Faster UTF-16 encoding

2012-06-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you for the quick turnaround! The patch is now pushed in 3.3. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker __

[issue15026] Faster UTF-16 encoding

2012-06-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset acca141fda80 by Antoine Pitrou in branch 'default': Issue #15026: utf-16 encoding is now significantly faster (up to 10x). http://hg.python.org/cpython/rev/acca141fda80 -- nosy: +python-dev ___ Python tr

[issue15026] Faster UTF-16 encoding

2012-06-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Serhiy, the tests crash here in debug mode: My fault. It's operator precedence issue in the assert expression. Gcc warns about it: Objects/unicodeobject.c: In function ‘_PyUnicode_EncodeUTF16’: Objects/unicodeobject.c:5401: warning: suggest parentheses aro

[issue15026] Faster UTF-16 encoding

2012-06-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Serhiy, the tests crash here in debug mode: $ ./python -m test -v test_unicode == CPython 3.3.0a4+ (default:b17c8005e08a+, Jun 15 2012, 19:28:56) [GCC 4.5.2] == Linux-2.6.38.8-desktop-10.mga-x86_64-with-mandrake-1-Official little-endian == /home/antoine/cpy

[issue15026] Faster UTF-16 encoding

2012-06-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you, Antoine. > 3327 (+360%) 15304 encode utf-16le 'A'*1 > 3314 (+335%) 14413 encode utf-16le '\x80'*1 > 3290 (+357%) 15036 encode utf-16be'\x80'+'A'* It must be a fluctuation (-30-40%). For all UCS1 strings the same code is use

[issue15026] Faster UTF-16 encoding

2012-06-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here are results under 64-bit Linux on a Core i5-2500K: 3.3 patched 3327 (+360%) 15304 encode utf-16le 'A'*1 3314 (+335%) 14413 encode utf-16le '\x80'*1 3315 (+578%) 22472 encode utf-16le'\x80'+'A'* 2390 (+668%) 18345 encode

[issue15026] Faster UTF-16 encoding

2012-06-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : In pair to issue14624 here is a patch than speed up UTF-16 encoding in several times. In addition, it fixes an unsafe check of an integer overflow. Here are the results of benchmarking. See benchmark tools in https://bitbucket.org/storchaka/cpython-stuff