diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2023-09-25 10:40:51 -0400 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2023-09-25 10:40:51 -0400 |
commit | 10edd5d9436153ace82009a04900ac67d3adc202 (patch) | |
tree | cee87aabc7a84bf5938419f99ce08079c17773ac /libcxx/benchmarks | |
parent | aa8f5e6156821aec1fed595f2e13d69655ec3311 (diff) | |
download | llvm-10edd5d9436153ace82009a04900ac67d3adc202.zip llvm-10edd5d9436153ace82009a04900ac67d3adc202.tar.gz llvm-10edd5d9436153ace82009a04900ac67d3adc202.tar.bz2 |
Revert "[libc++][ranges] Add benchmarks for the `from_range` constructors of `vector` and `deque`."
This reverts commit 390ac823178fc1073612b4c8a38835f441138d9d.
It broke the sphinx publish bots for our documentation:
https://lab.llvm.org/buildbot/#/builders/242/builds/1130
because that machine has GCC 9.4.0 which does not know about C++23
Diffstat (limited to 'libcxx/benchmarks')
-rw-r--r-- | libcxx/benchmarks/CMakeLists.txt | 15 | ||||
-rw-r--r-- | libcxx/benchmarks/ContainerBenchmarks.h | 10 | ||||
-rw-r--r-- | libcxx/benchmarks/deque.bench.cpp | 9 | ||||
-rw-r--r-- | libcxx/benchmarks/vector_operations.bench.cpp | 9 |
4 files changed, 1 insertions, 42 deletions
diff --git a/libcxx/benchmarks/CMakeLists.txt b/libcxx/benchmarks/CMakeLists.txt index c7cb330..041c0d3 100644 --- a/libcxx/benchmarks/CMakeLists.txt +++ b/libcxx/benchmarks/CMakeLists.txt @@ -76,20 +76,7 @@ set(BENCHMARK_LIBCXX_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-libcxx) set(BENCHMARK_NATIVE_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-native) add_library( cxx-benchmarks-flags INTERFACE) -#TODO(cmake): remove the `add_compile_options`. Currently we have to explicitly -# pass the `std:c++latest` flag on Windows to work around an issue where -# requesting `cxx_std_23` results in an error -- somehow CMake fails to -# translate the `c++23` flag into `c++latest`, and the highest numbered C++ -# version that MSVC flags support is C++20. -if (MSVC) - add_compile_options(/std:c++latest) -# ibm-clang does not recognize the cxx_std_32 flag, so use this as a temporary -# workaround on AIX as well. -elseif (${CMAKE_SYSTEM_NAME} MATCHES "AIX") - add_compile_options(-std=c++23) -else() - target_compile_features( cxx-benchmarks-flags INTERFACE cxx_std_23) -endif() +target_compile_features( cxx-benchmarks-flags INTERFACE cxx_std_20) target_compile_options( cxx-benchmarks-flags INTERFACE -fsized-deallocation -nostdinc++) target_include_directories(cxx-benchmarks-flags INTERFACE "${LIBCXX_GENERATED_INCLUDE_DIR}" INTERFACE "${BENCHMARK_LIBCXX_INSTALL}/include" diff --git a/libcxx/benchmarks/ContainerBenchmarks.h b/libcxx/benchmarks/ContainerBenchmarks.h index 071e46c..f738c5e 100644 --- a/libcxx/benchmarks/ContainerBenchmarks.h +++ b/libcxx/benchmarks/ContainerBenchmarks.h @@ -70,16 +70,6 @@ void BM_ConstructIterIter(benchmark::State& st, Container, GenInputs gen) { } template <class Container, class GenInputs> -void BM_ConstructFromRange(benchmark::State& st, Container, GenInputs gen) { - auto in = gen(st.range(0)); - benchmark::DoNotOptimize(&in); - while (st.KeepRunning()) { - Container c(std::from_range, in); - DoNotOptimizeData(c); - } -} - -template <class Container, class GenInputs> void BM_InsertValue(benchmark::State& st, Container c, GenInputs gen) { auto in = gen(st.range(0)); const auto end = in.end(); diff --git a/libcxx/benchmarks/deque.bench.cpp b/libcxx/benchmarks/deque.bench.cpp index d6dadaa..ced2ba2 100644 --- a/libcxx/benchmarks/deque.bench.cpp +++ b/libcxx/benchmarks/deque.bench.cpp @@ -30,13 +30,4 @@ BENCHMARK_CAPTURE(BM_ConstructIterIter, deque_size_t, std::deque<size_t>{}, getR BENCHMARK_CAPTURE(BM_ConstructIterIter, deque_string, std::deque<std::string>{}, getRandomStringInputs) ->Arg(TestNumInputs); -BENCHMARK_CAPTURE(BM_ConstructFromRange, deque_char, std::deque<char>{}, getRandomIntegerInputs<char>) - ->Arg(TestNumInputs); - -BENCHMARK_CAPTURE(BM_ConstructFromRange, deque_size_t, std::deque<size_t>{}, getRandomIntegerInputs<size_t>) - ->Arg(TestNumInputs); - -BENCHMARK_CAPTURE(BM_ConstructFromRange, deque_string, std::deque<std::string>{}, getRandomStringInputs) - ->Arg(TestNumInputs); - BENCHMARK_MAIN(); diff --git a/libcxx/benchmarks/vector_operations.bench.cpp b/libcxx/benchmarks/vector_operations.bench.cpp index be0bee6..e02f0ee 100644 --- a/libcxx/benchmarks/vector_operations.bench.cpp +++ b/libcxx/benchmarks/vector_operations.bench.cpp @@ -30,13 +30,4 @@ BENCHMARK_CAPTURE(BM_ConstructIterIter, vector_size_t, std::vector<size_t>{}, ge BENCHMARK_CAPTURE(BM_ConstructIterIter, vector_string, std::vector<std::string>{}, getRandomStringInputs) ->Arg(TestNumInputs); -BENCHMARK_CAPTURE(BM_ConstructFromRange, vector_char, std::vector<char>{}, getRandomIntegerInputs<char>) - ->Arg(TestNumInputs); - -BENCHMARK_CAPTURE(BM_ConstructFromRange, vector_size_t, std::vector<size_t>{}, getRandomIntegerInputs<size_t>) - ->Arg(TestNumInputs); - -BENCHMARK_CAPTURE(BM_ConstructFromRange, vector_string, std::vector<std::string>{}, getRandomStringInputs) - ->Arg(TestNumInputs); - BENCHMARK_MAIN(); |