[libcxx-commits] [libcxx] [libc++] Make benchmarks forward-compatible with the test suite (PR #114502)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 4 07:37:51 PST 2024
================
@@ -19,7 +21,8 @@ static void bm_lexicographical_compare(benchmark::State& state) {
for (auto _ : state) {
benchmark::DoNotOptimize(vec1);
benchmark::DoNotOptimize(vec2);
- benchmark::DoNotOptimize(std::lexicographical_compare(vec1.begin(), vec1.end(), vec2.begin(), vec2.end()));
+ bool result = std::lexicographical_compare(vec1.begin(), vec1.end(), vec2.begin(), vec2.end());
+ benchmark::DoNotOptimize(result);
----------------
ldionne wrote:
Removing this diff seems not to make any difference. I'll remove it.
https://github.com/llvm/llvm-project/pull/114502
More information about the libcxx-commits
mailing list