Skip to content

Revert "[cxx-interop] Create benchmarks for using std::span in Swift" #76375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ set(SWIFT_BENCH_MODULES
cxx-source/CxxVectorSum
# TODO: rdar://92120528
# cxx-source/ReadAccessor
cxx-source/CxxSpanTests
)

set(SWIFT_MULTISOURCE_SWIFT_BENCHES
Expand Down
121 changes: 0 additions & 121 deletions benchmark/cxx-source/CxxSpanTests.swift

This file was deleted.

30 changes: 0 additions & 30 deletions benchmark/utils/CxxTests/CxxStdlibPerformance.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,11 @@
#include <vector>
#include <set>

// FIXME swift-ci linux tests do not support std::span
#if defined(__has_include) && __has_include(<span>)
#include <span>
#define SPAN_DEFINED 1
#else
#define SPAN_DEFINED 0
#endif

static const size_t spanSize = 50000;

using VectorOfU32 = std::vector<uint32_t>;
using SetOfU32 = std::set<uint32_t>;
#if SPAN_DEFINED
using ArrayOfU32 = uint32_t[spanSize];
using SpanOfU32 = std::span<uint32_t>;
#endif

static inline VectorOfU32 vec;
static inline SetOfU32 set;
#if SPAN_DEFINED
static inline ArrayOfU32 array;
static inline SpanOfU32 span;
#endif

inline void initVector(size_t size) {
if (!vec.empty()) {
Expand All @@ -47,18 +29,6 @@ inline void initSet(size_t size) {
}
}

#if SPAN_DEFINED
inline void initSpan() {
if (!span.empty()) {
return;
}
for (size_t i = 0; i < spanSize; ++i) {
array[i] = uint32_t(i);
}
span = SpanOfU32(array);
}
#endif

inline VectorOfU32 makeVector32(size_t size) {
initVector(size);
return vec;
Expand Down
2 changes: 0 additions & 2 deletions benchmark/utils/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ import CreateObjects
import CxxStringConversion
// rdar://128520766
// import CxxVectorSum
import CxxSpanTests
import DataBenchmarks
import DeadArray
import DevirtualizeProtocolComposition
Expand Down Expand Up @@ -259,7 +258,6 @@ register(CreateObjects.benchmarks)
register(CxxStringConversion.benchmarks)
// rdar://128520766
// register(CxxVectorSum.benchmarks)
register(CxxSpanTests.benchmarks)
register(DataBenchmarks.benchmarks)
register(DeadArray.benchmarks)
register(DevirtualizeProtocolComposition.benchmarks)
Expand Down