[issue46848] Use optimized string search function in mmap.find()

2022-03-02 Thread STINNER Victor
STINNER Victor added the comment: New changeset b6b711a1aa233001c1874af1d920e459b6bf962c by Victor Stinner in branch 'main': bpo-46848: Move _PyBytes_Find() to internal C API (GH-31642) https://github.com/python/cpython/commit/b6b711a1aa233001c1874af1d920e459b6bf962c -- ___

[issue46848] Use optimized string search function in mmap.find()

2022-03-02 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 3.0 -> 4.0 pull_requests: +29762 pull_request: https://github.com/python/cpython/pull/31642 ___ Python tracker ___ ___

[issue46848] Use optimized string search function in mmap.find()

2022-03-01 Thread Dennis Sweeney
Dennis Sweeney added the comment: Thanks for the report! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> performance ___ Python tracker _

[issue46848] Use optimized string search function in mmap.find()

2022-03-01 Thread Dennis Sweeney
Dennis Sweeney added the comment: New changeset 6ddb09f35b922a3bbb59e408a3ca7636a6938468 by Dennis Sweeney in branch 'main': bpo-46848: Use stringlib/fastsearch in mmap (GH-31625) https://github.com/python/cpython/commit/6ddb09f35b922a3bbb59e408a3ca7636a6938468 -- _

[issue46848] Use optimized string search function in mmap.find()

2022-02-28 Thread Dennis Sweeney
Dennis Sweeney added the comment: PR 31625 is an alternative proposal. It uses the Crochemore and Perrin's Two-Way algorithm that @benrg references (see Objects/stringlib/fastsearch.h and Objects/stringlib/stringlib_find_two_way_notes.txt), and is platform-independent. --

[issue46848] Use optimized string search function in mmap.find()

2022-02-28 Thread Dennis Sweeney
Change by Dennis Sweeney : -- nosy: +Dennis Sweeney nosy_count: 2.0 -> 3.0 pull_requests: +29749 pull_request: https://github.com/python/cpython/pull/31625 ___ Python tracker _

[issue46848] Use optimized string search function in mmap.find()

2022-02-24 Thread benrg
benrg added the comment: memmem isn't a standard C function, and some libraries don't have it, notably Microsoft's. newlib's memmem seems to be the same as glibc's, but is under a BSD 3-clause license instead of LGPL. An older version of newlib's memmem (prior to 2019-01-01) has the license

[issue46848] Use optimized string search function in mmap.find()

2022-02-24 Thread Stefan Tatschner
Change by Stefan Tatschner : -- keywords: +patch pull_requests: +29675 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31554 ___ Python tracker ___

[issue46848] Use optimized string search function in mmap.find()

2022-02-24 Thread Stefan Tatschner
Stefan Tatschner added the comment: Sorry, I mean memmem(3). :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue46848] Use optimized string search function in mmap.find()

2022-02-24 Thread Stefan Tatschner
New submission from Stefan Tatschner : The mmap.find() in function uses a naive loop to search string matches. This can be optimized “for free” by using libc's memmap(3) function instead. The relevant file is Modules/mmapmodule.c, the relevant function is mmap_gfind(). -- messages: 4