tim wrote: > > p =3D memchr(s, sub[0], e - s); > > if (p =3D=3D NULL) > > break; > > if (n =3D=3D 1 || memcmp(p, sub, n) =3D=3D 0) > > return (long) (p - s); > I expect that whether this is faster or slower depends on both the = compiler > you're using and the exact strings you're using to time it. With test strings that contain false matches for every single position, it's 30% slower than the old code in my tests. With test strings that contain no false matches, it's 50% faster. But without more extensive tests on a variety of platforms, we might as well forget about this one... </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4