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, but also by str for ASCII and Latin1 strings.

Are you interested to implement this idea Serhiy?

For Windows without memrchr(), the code can be a simple loop.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23573>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to