[issue23573] Avoid redundant allocations in str.find and like

2015-07-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 ___ Python tracker ___ ___

[issue23573] Avoid redundant allocations in str.find and like

2015-07-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 311a4d28631b by Serhiy Storchaka in branch '3.5': Issue #23573: Restored optimization of bytes.rfind() and bytearray.rfind() https://hg.python.org/cpython/rev/311a4d28631b New changeset c06410c68217 by Serhiy Storchaka in branch 'default': Issue #23

[issue23573] Avoid redundant allocations in str.find and like

2015-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that restores optimization of bytes.rfind() and bytearray.rfind() with 1-byte argument on Linux (it also reverts bc1a178b3bc8). -- nosy: +christian.heimes resolution: fixed -> stage: resolved -> patch review Added file: http://bugs.p

[issue23573] Avoid redundant allocations in str.find and like

2015-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Many thanks Victor for fixing crashes. Unfortunately I couldn't reproduce a crash on my computers, perhaps it is was 64-bit only. Yes, I'll look how the code can be optimized. -- ___ Python tracker

[issue23573] Avoid redundant allocations in str.find and like

2015-03-24 Thread STINNER Victor
STINNER Victor added the comment: It looks like fastsearch_memchr_1char() manipulate pointers for memory alignment. It's not necessary when looking for ASCII or Latin1 characters or for bytes. I propose to add a new fastsearch_memchr_1byte() function which would be used by bytes and bytearray

[issue23573] Avoid redundant allocations in str.find and like

2015-03-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3ac58de829ef by Victor Stinner in branch 'default': Issue #23573: Fix bytes.rfind() and bytearray.rfind() on Windows https://hg.python.org/cpython/rev/3ac58de829ef -- ___ Python tracker

[issue23573] Avoid redundant allocations in str.find and like

2015-03-24 Thread STINNER Victor
STINNER Victor added the comment: The problem is that Windows has no memrchr() function, and so fastsearch_memchr_1char() only supports FAST_SEARCH on Windows. -- ___ Python tracker ___

[issue23573] Avoid redundant allocations in str.find and like

2015-03-24 Thread STINNER Victor
STINNER Victor added the comment: > Looks as this patch makes buildbots crash. Yep. It took me some minutes to find that the crash was caused by this issue :-p http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/5930/steps/test/logs/stdio ... [117/393/1] test_bigmem Ass

[issue23573] Avoid redundant allocations in str.find and like

2015-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Looks as this patch makes buildbots crash. -- status: closed -> open ___ Python tracker ___ ___ Py

[issue23573] Avoid redundant allocations in str.find and like

2015-03-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue23573] Avoid redundant allocations in str.find and like

2015-03-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6db9d7c1be29 by Serhiy Storchaka in branch 'default': Issue #23573: Increased performance of string search operations (str.find, https://hg.python.org/cpython/rev/6db9d7c1be29 -- nosy: +python-dev ___ Pyt

[issue23573] Avoid redundant allocations in str.find and like

2015-03-03 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently str.find() and similar methods can make a copy of self or searched string if they have different kinds. In some cases this is redundant because the result can be known before trying to search. Longer string can't be found in shorter string and wi