[libc-commits] [PATCH] D147822: [libc] Add memmem implementation
Caslyn Tonelli via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Apr 10 14:25:39 PDT 2023
Caslyn marked an inline comment as done.
Caslyn added inline comments.
================
Comment at: libc/src/string/memory_utils/strstr_implementations.h:17
-template <typename Comp>
-constexpr static char *strstr_implementation(const char *haystack,
- const char *needle, Comp &&comp) {
----------------
mcgrathr wrote:
> It might make sense to keep this around and still call it from strstr, even if strstr_implementation just calls memmem_implementation. An optimized strstr might roll the length determination into the search more efficiently than strlen+memmem so it doesn't seem ideal to have the public entrypoint code assume that strlen+memmem is the implementation you want.
>
>
That makes sense - thanks for pointing out.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147822/new/
https://reviews.llvm.org/D147822
More information about the libc-commits
mailing list