[libcxx-commits] [PATCH] D120637: [libc++][ranges] Implement ranges::minmax and ranges::minmax_element
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Apr 11 06:33:09 PDT 2022
ldionne added inline comments.
================
Comment at: libcxx/benchmarks/algorithms.bench.cpp:360-362
+ runOpOnCopies<ValueType>(state, Quantity, Order(), BatchSize::CountElements, [](auto& Copy) {
+ benchmark::DoNotOptimize(std::minmax_element(Copy.begin(), Copy.end()));
+ });
----------------
Could you try this instead?
```
auto res = std::minmax_element(Copy.begin(), Copy.end());
benchmark::DoNotOptimize(res);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120637/new/
https://reviews.llvm.org/D120637
More information about the libcxx-commits
mailing list