mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
needforspeed: use Py_ssize_t for the fastsearch counter and skip
length (thanks, neal!). and yes, I've verified that this doesn't slow things down ;-)
This commit is contained in:
parent
450277fef5
commit
f2c0dfdb13
2 changed files with 2 additions and 2 deletions
|
@ -802,7 +802,7 @@ LOCAL(Py_ssize_t)
|
||||||
fastsearch(const char* s, Py_ssize_t n, const char* p, Py_ssize_t m, int mode)
|
fastsearch(const char* s, Py_ssize_t n, const char* p, Py_ssize_t m, int mode)
|
||||||
{
|
{
|
||||||
long mask;
|
long mask;
|
||||||
int skip, count = 0;
|
Py_ssize_t skip, count = 0;
|
||||||
Py_ssize_t i, j, mlast, w;
|
Py_ssize_t i, j, mlast, w;
|
||||||
|
|
||||||
w = n - m;
|
w = n - m;
|
||||||
|
|
|
@ -3884,7 +3884,7 @@ LOCAL(Py_ssize_t)
|
||||||
fastsearch(Py_UNICODE* s, Py_ssize_t n, Py_UNICODE* p, Py_ssize_t m, int mode)
|
fastsearch(Py_UNICODE* s, Py_ssize_t n, Py_UNICODE* p, Py_ssize_t m, int mode)
|
||||||
{
|
{
|
||||||
long mask;
|
long mask;
|
||||||
int skip, count = 0;
|
Py_ssize_t skip, count = 0;
|
||||||
Py_ssize_t i, j, mlast, w;
|
Py_ssize_t i, j, mlast, w;
|
||||||
|
|
||||||
w = n - m;
|
w = n - m;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue