Skip to content

Commit 0e95c75

Browse files
committedOct 10, 2022
[interop] cxx vector benchmark: do not use subscript until #61499 is fixed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎benchmark/cxx-source/CxxVectorSum.swift

+5
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ public func run_CxxVectorOfU32_Sum_Swift_RawIteratorLoop(_ n: Int) {
8282
blackHole(sum)
8383
}
8484

85+
// Need to wait for https://github.com/apple/swift/issues/61499
8586
@inline(never)
8687
public func run_CxxVectorOfU32_Sum_Swift_IndexAndSubscriptLoop(_ n: Int) {
88+
#if FIXED_61499
8789
let vectorOfU32 = makeVector32(vectorSize)
8890
var sum: UInt32 = 0
8991
for _ in 0..<(n * iterRepeatFactor) {
@@ -92,6 +94,9 @@ public func run_CxxVectorOfU32_Sum_Swift_IndexAndSubscriptLoop(_ n: Int) {
9294
}
9395
}
9496
blackHole(sum)
97+
#else
98+
run_CxxVectorOfU32_Sum_Swift_RawIteratorLoop(n)
99+
#endif
95100
}
96101

97102
@inline(never)

0 commit comments

Comments
 (0)
Please sign in to comment.