[issue16757] Faster _PyUnicode_FindMaxChar()

2013-04-02 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 7132bca093ad by Victor Stinner in branch 'default': > Close #16757: Avoid calling the expensive _PyUnicode_FindMaxChar() function This changeset is almost the same than unicode_findmaxchar_2.patch. I prefered to keep the API unchanged and not ca

[issue16757] Faster _PyUnicode_FindMaxChar()

2013-04-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7132bca093ad by Victor Stinner in branch 'default': Close #16757: Avoid calling the expensive _PyUnicode_FindMaxChar() function http://hg.python.org/cpython/rev/7132bca093ad -- nosy: +python-dev resolution: -> fixed stage: patch review -> c

[issue16757] Faster _PyUnicode_FindMaxChar()

2013-04-02 Thread STINNER Victor
STINNER Victor added the comment: Related commit: changeset: 83066:b5d5f422299f tag: tip user:Victor Stinner date:Wed Apr 03 01:48:39 2013 +0200 files: Include/unicodeobject.h Lib/test/test_format.py Objects/stringlib/unicode_format.h Objects/unicodeobject.c des

[issue16757] Faster _PyUnicode_FindMaxChar()

2012-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is redundant and useless, but do as you want. -- Added file: http://bugs.python.org/file28428/unicode_findmaxchar_2.patch ___ Python tracker __

[issue16757] Faster _PyUnicode_FindMaxChar()

2012-12-24 Thread STINNER Victor
STINNER Victor added the comment: > It is not more surprising that specify a "start" argument for sum(). Un pythin, the start attribute of sum is optional. > I don't think we should worry about third party module which violate the API. It will crash in any case when the exported function will d

[issue16757] Faster _PyUnicode_FindMaxChar()

2012-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not more surprising that specify a "start" argument for sum(). I don't think we should worry about third party module which violate the API. It will crash in any case when the exported function will disappear and will be replaced by macros. --

[issue16757] Faster _PyUnicode_FindMaxChar()

2012-12-24 Thread STINNER Victor
STINNER Victor added the comment: Avoid scanning a substring to compute the maximum character is a good thing, so +1 for the idea. Instead of modifying an existing function, it might be safer to rename it. Even if it is private, a third party module *can* use it outside Python. It is also surp

[issue16757] Faster _PyUnicode_FindMaxChar()

2012-12-24 Thread STINNER Victor
STINNER Victor added the comment: See issues #14687 and #14716 for benchmarks and information about the changes introducing and using _PyUnicodeWriter for str%args and str.format(args). -- ___ Python tracker _

[issue16757] Faster _PyUnicode_FindMaxChar()

2012-12-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28408/format_bench.sh ___ Python tracker ___ ___ Python-bugs-list mailing

[issue16757] Faster _PyUnicode_FindMaxChar()

2012-12-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The proposed patch optimizes _PyUnicode_FindMaxChar(). This affects string formatting of long patterns (speedup to 15-25% for classic formatting and 5-8% for new style formatting). -- components: Interpreter Core, Unicode files: unicode_findmaxchar