Skip to content

Commit c29788a

Browse files
authored
Merge pull request #76236 from swiftlang/revert-75436-susmonteiro/cxx-span-benchmarks
Revert "[cxx-interop] Create benchmarks for using std::span in Swift"
2 parents 3f317a1 + c3ded9a commit c29788a

File tree

4 files changed

+0
-151
lines changed

4 files changed

+0
-151
lines changed

benchmark/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ set(SWIFT_BENCH_MODULES
214214
cxx-source/CxxVectorSum
215215
# TODO: rdar://92120528
216216
# cxx-source/ReadAccessor
217-
cxx-source/CxxSpanTests
218217
)
219218

220219
set(SWIFT_MULTISOURCE_SWIFT_BENCHES

benchmark/cxx-source/CxxSpanTests.swift

Lines changed: 0 additions & 121 deletions
This file was deleted.

benchmark/utils/CxxTests/CxxStdlibPerformance.h

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,11 @@
44
#include <vector>
55
#include <set>
66

7-
// FIXME swift-ci linux tests do not support std::span
8-
#if __has_include(<span>)
9-
#include <span>
10-
#endif
11-
12-
static const size_t spanSize = 50000;
13-
14-
using ArrayOfU32 = uint32_t[spanSize];
157
using VectorOfU32 = std::vector<uint32_t>;
168
using SetOfU32 = std::set<uint32_t>;
17-
#if __has_include(<span>)
18-
using SpanOfU32 = std::span<uint32_t>;
19-
#endif
209

21-
static inline ArrayOfU32 array;
2210
static inline VectorOfU32 vec;
2311
static inline SetOfU32 set;
24-
#if __has_include(<span>)
25-
static inline SpanOfU32 span;
26-
#endif
2712

2813
inline void initVector(size_t size) {
2914
if (!vec.empty()) {
@@ -44,18 +29,6 @@ inline void initSet(size_t size) {
4429
}
4530
}
4631

47-
#if __has_include(<span>)
48-
inline void initSpan() {
49-
if (!span.empty()) {
50-
return;
51-
}
52-
for (size_t i = 0; i < spanSize; ++i) {
53-
array[i] = uint32_t(i);
54-
}
55-
span = SpanOfU32(array);
56-
}
57-
#endif
58-
5932
inline VectorOfU32 makeVector32(size_t size) {
6033
initVector(size);
6134
return vec;

benchmark/utils/main.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ import CreateObjects
6060
import CxxStringConversion
6161
// rdar://128520766
6262
// import CxxVectorSum
63-
import CxxSpanTests
6463
import DataBenchmarks
6564
import DeadArray
6665
import DevirtualizeProtocolComposition
@@ -259,7 +258,6 @@ register(CreateObjects.benchmarks)
259258
register(CxxStringConversion.benchmarks)
260259
// rdar://128520766
261260
// register(CxxVectorSum.benchmarks)
262-
register(CxxSpanTests.benchmarks)
263261
register(DataBenchmarks.benchmarks)
264262
register(DeadArray.benchmarks)
265263
register(DevirtualizeProtocolComposition.benchmarks)

0 commit comments

Comments
 (0)