Skip to content

Revert "[cxx-interop] Create benchmarks for using std::span in Swift" and "[cxx-interop] Fix check to include std::span" #76376

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

Merged
merged 2 commits into from
Sep 11, 2024
Merged
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.

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

// FIXME swift-ci linux tests do not support std::span
#ifndef __linux__
#include <span>
#endif // __linux__

static const size_t spanSize = 50000;

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

static inline VectorOfU32 vec;
static inline SetOfU32 set;
#ifndef __linux__
static inline ArrayOfU32 array;
static inline SpanOfU32 span;
#endif // __linux__

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

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

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