[libcxx-commits] [PATCH] D67667: Add benchmarks for string assign methods
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 24 10:11:05 PDT 2019
EricWF accepted this revision.
EricWF added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: libcxx/benchmarks/string.bench.cpp:267
+ constexpr size_t kNumStrings = 4 << 10;
+ std::string strings[kNumStrings];
+ while (state.KeepRunningBatch(kNumStrings)) {
----------------
Escape this memory with `DoNotOptimize` before entering the loop.
================
Comment at: libcxx/benchmarks/string.bench.cpp:289
+ static void run(benchmark::State& state) {
+ constexpr auto O = Opaque{};
+ constexpr auto D = DiffType::Control;
----------------
`constexpr Opaque O{};`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67667/new/
https://reviews.llvm.org/D67667
More information about the libcxx-commits
mailing list