[libcxx-commits] [libcxx] f21e56c - [libc++] Add benchmark for std::find(vector<short>)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 7 02:22:16 PST 2026
Author: Nikolas Klauser
Date: 2026-01-07T11:21:57+01:00
New Revision: f21e56c6321ee1a9b442eb92ae749e6b06e4193b
URL: https://github.com/llvm/llvm-project/commit/f21e56c6321ee1a9b442eb92ae749e6b06e4193b
DIFF: https://github.com/llvm/llvm-project/commit/f21e56c6321ee1a9b442eb92ae749e6b06e4193b.diff
LOG: [libc++] Add benchmark for std::find(vector<short>)
We have special cases for `std::find` with `char` and `int` on most
platforms, so the only other benchmark of or vector implementation
is currently with `long long`, which is a rather big type. Adding
`short` to the benchmarks allows us to more meaningfully compare the
different implementations.
Added:
Modified:
libcxx/test/benchmarks/algorithms/nonmodifying/find.bench.cpp
Removed:
################################################################################
diff --git a/libcxx/test/benchmarks/algorithms/nonmodifying/find.bench.cpp b/libcxx/test/benchmarks/algorithms/nonmodifying/find.bench.cpp
index 7780b5a92a6c4..a9e7aeea80ed8 100644
--- a/libcxx/test/benchmarks/algorithms/nonmodifying/find.bench.cpp
+++ b/libcxx/test/benchmarks/algorithms/nonmodifying/find.bench.cpp
@@ -51,6 +51,7 @@ int main(int argc, char** argv) {
auto register_benchmarks = [&](auto bm, std::string comment) {
// find
bm.template operator()<std::vector<char>>("std::find(vector<char>) (" + comment + ")", std_find);
+ bm.template operator()<std::vector<short>>("std::find(vector<short>) (" + comment + ")", std_find);
bm.template operator()<std::vector<int>>("std::find(vector<int>) (" + comment + ")", std_find);
bm.template operator()<std::vector<long long>>("std::find(vector<long long>) (" + comment + ")", std_find);
bm.template operator()<std::deque<int>>("std::find(deque<int>) (" + comment + ")", std_find);
More information about the libcxx-commits
mailing list