Skip to content

Commit 10edd5d

Browse files
committed
Revert "[libc++][ranges] Add benchmarks for the from_range constructors of vector and deque."
This reverts commit 390ac82. 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
1 parent aa8f5e6 commit 10edd5d

File tree

4 files changed

+1
-42
lines changed

4 files changed

+1
-42
lines changed

libcxx/benchmarks/CMakeLists.txt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,7 @@ set(BENCHMARK_LIBCXX_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-libcxx)
7676
set(BENCHMARK_NATIVE_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-native)
7777

7878
add_library( cxx-benchmarks-flags INTERFACE)
79-
#TODO(cmake): remove the `add_compile_options`. Currently we have to explicitly
80-
# pass the `std:c++latest` flag on Windows to work around an issue where
81-
# requesting `cxx_std_23` results in an error -- somehow CMake fails to
82-
# translate the `c++23` flag into `c++latest`, and the highest numbered C++
83-
# version that MSVC flags support is C++20.
84-
if (MSVC)
85-
add_compile_options(/std:c++latest)
86-
# ibm-clang does not recognize the cxx_std_32 flag, so use this as a temporary
87-
# workaround on AIX as well.
88-
elseif (${CMAKE_SYSTEM_NAME} MATCHES "AIX")
89-
add_compile_options(-std=c++23)
90-
else()
91-
target_compile_features( cxx-benchmarks-flags INTERFACE cxx_std_23)
92-
endif()
79+
target_compile_features( cxx-benchmarks-flags INTERFACE cxx_std_20)
9380
target_compile_options( cxx-benchmarks-flags INTERFACE -fsized-deallocation -nostdinc++)
9481
target_include_directories(cxx-benchmarks-flags INTERFACE "${LIBCXX_GENERATED_INCLUDE_DIR}"
9582
INTERFACE "${BENCHMARK_LIBCXX_INSTALL}/include"

libcxx/benchmarks/ContainerBenchmarks.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,6 @@ void BM_ConstructIterIter(benchmark::State& st, Container, GenInputs gen) {
6969
}
7070
}
7171

72-
template <class Container, class GenInputs>
73-
void BM_ConstructFromRange(benchmark::State& st, Container, GenInputs gen) {
74-
auto in = gen(st.range(0));
75-
benchmark::DoNotOptimize(&in);
76-
while (st.KeepRunning()) {
77-
Container c(std::from_range, in);
78-
DoNotOptimizeData(c);
79-
}
80-
}
81-
8272
template <class Container, class GenInputs>
8373
void BM_InsertValue(benchmark::State& st, Container c, GenInputs gen) {
8474
auto in = gen(st.range(0));

libcxx/benchmarks/deque.bench.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,4 @@ BENCHMARK_CAPTURE(BM_ConstructIterIter, deque_size_t, std::deque<size_t>{}, getR
3030
BENCHMARK_CAPTURE(BM_ConstructIterIter, deque_string, std::deque<std::string>{}, getRandomStringInputs)
3131
->Arg(TestNumInputs);
3232

33-
BENCHMARK_CAPTURE(BM_ConstructFromRange, deque_char, std::deque<char>{}, getRandomIntegerInputs<char>)
34-
->Arg(TestNumInputs);
35-
36-
BENCHMARK_CAPTURE(BM_ConstructFromRange, deque_size_t, std::deque<size_t>{}, getRandomIntegerInputs<size_t>)
37-
->Arg(TestNumInputs);
38-
39-
BENCHMARK_CAPTURE(BM_ConstructFromRange, deque_string, std::deque<std::string>{}, getRandomStringInputs)
40-
->Arg(TestNumInputs);
41-
4233
BENCHMARK_MAIN();

libcxx/benchmarks/vector_operations.bench.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,4 @@ BENCHMARK_CAPTURE(BM_ConstructIterIter, vector_size_t, std::vector<size_t>{}, ge
3030
BENCHMARK_CAPTURE(BM_ConstructIterIter, vector_string, std::vector<std::string>{}, getRandomStringInputs)
3131
->Arg(TestNumInputs);
3232

33-
BENCHMARK_CAPTURE(BM_ConstructFromRange, vector_char, std::vector<char>{}, getRandomIntegerInputs<char>)
34-
->Arg(TestNumInputs);
35-
36-
BENCHMARK_CAPTURE(BM_ConstructFromRange, vector_size_t, std::vector<size_t>{}, getRandomIntegerInputs<size_t>)
37-
->Arg(TestNumInputs);
38-
39-
BENCHMARK_CAPTURE(BM_ConstructFromRange, vector_string, std::vector<std::string>{}, getRandomStringInputs)
40-
->Arg(TestNumInputs);
41-
4233
BENCHMARK_MAIN();

0 commit comments

Comments
 (0)