[issue14654] More fast utf-8 decoding

2012-04-24 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Thank you, Antoine. It is interesting results, that on 64 bits greatly accelerated the case, which on 32 bits sped up a little. It was the pathology that a 2-byte to UCS1 was decoded in 1.5x slower than a 2-byte to UCS2. Interestingly, a

[issue14654] More fast utf-8 decoding

2012-04-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file25338/utf8-signed.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14654 ___

[issue14654] More fast utf-8 decoding

2012-04-24 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I'm -1 on using signed char in the implementation. If this gives any advantage, it's because the compiler is not able to generate as efficient code for unsigned char as it does for signed char. So the performance results may again change

[issue14654] More fast utf-8 decoding

2012-04-24 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: I'm -1 on using signed char in the implementation. I completely agree with you, for these and for other not mentioned reasons. So I don't released this patch yesterday, and did not suggest it to accept. I showed him just out of curiosity

[issue14654] More fast utf-8 decoding

2012-04-24 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Here are two new patches. The first one takes into account the Martin wishes about comments. The second also rejects optimization for ASCII. On the Intel Atom last patch annihilates acceleration for some cases (mostly-ascii with UCS2

[issue14654] More fast utf-8 decoding

2012-04-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka storch...@gmail.com: The utf-8 decoder is already well optimized. I propose a patch, which accelerates the utf-8 decoder for some of the frequent cases even more (+10-30%). In particular, for 2-bites non-latin1 codes will get about +30%. This is not the

[issue14654] More fast utf-8 decoding

2012-04-23 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Here are the results of benchmarking (numbers in MB/s). On 32-bit Linux, AMD Athlon 64 X2 4600+ @ 2.4GHz: Py2.7 Py3.2 Py3.3 patch utf-8 'A'*1

[issue14654] More fast utf-8 decoding

2012-04-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: 64-bit Linux, Intel Core i5-2500K CPU @ 3.30GHz: vanilla 3.3 patched utf-8 'A'*1 6668 (+7%)7145 utf-8 'A'*+'\x80' 2358 (+3%)2418 utf-8

[issue14654] More fast utf-8 decoding

2012-04-23 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: 64-bit Linux, Intel Core i5-2500K CPU @ 3.30GHz: (...) Hum, the patch doesn't look very interesting if it only optimize one specific case: utf-8     '\x80'*1                    366 (+53%)    559 --

[issue14654] More fast utf-8 decoding

2012-04-23 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14654 ___ ___ Python-bugs-list mailing list

[issue14654] More fast utf-8 decoding

2012-04-23 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14654 ___