[libcxx-commits] [libcxx] [libc++][ranges] optimize the performance of `ranges::starts_with` (PR #84570)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 26 10:09:06 PDT 2024
philnik777 wrote:
IIRC these aren't at all the numbers I got when benchmarking `std::mismatch` against `memcmp`, so I'd really like to check this again before this lands. I also don't see how there'd be a significant difference, since the loop part in both `memcmp` and `std::mismtach` is finding a mismatch. The part that is more work in `std::mismatch` is always only at the end of the loop, so I'd expect at most a constant time difference between the implementations (which is exactly what I observed IIRC).
https://github.com/llvm/llvm-project/pull/84570
More information about the libcxx-commits
mailing list