@@ -19,27 +19,23 @@ import Cxx
19
19
20
20
public let benchmarks = [
21
21
BenchmarkInfo (
22
- name: " CxxVectorOfU32 .Sum.Cxx.RangedForLoop" ,
22
+ name: " CxxVecU32 .Sum.Cxx.RangedForLoop" ,
23
23
runFunction: run_CxxVectorOfU32_Sum_Cxx_RangedForLoop,
24
24
tags: [ . validation, . bridging, . cxxInterop] ) ,
25
25
BenchmarkInfo (
26
- name: " CxxVectorOfU32 .Sum.Swift.ForInLoop" ,
26
+ name: " CxxVecU32 .Sum.Swift.ForInLoop" ,
27
27
runFunction: run_CxxVectorOfU32_Sum_Swift_ForInLoop,
28
28
tags: [ . validation, . bridging, . cxxInterop] ) ,
29
29
BenchmarkInfo (
30
- name: " CxxVectorOfU32 .Sum.Swift.RawIteratorLoop " ,
30
+ name: " CxxVecU32 .Sum.Swift.IteratorLoop " ,
31
31
runFunction: run_CxxVectorOfU32_Sum_Swift_RawIteratorLoop,
32
32
tags: [ . validation, . bridging, . cxxInterop] ) ,
33
33
BenchmarkInfo (
34
- name: " CxxVectorOfU32.Sum.Swift.RawIteratorLoop.WithCxxInlineHelpers " ,
35
- runFunction: run_CxxVectorOfU32_Sum_Swift_RawIteratorLoop_WithCxxInlineHelpers,
36
- tags: [ . validation, . bridging, . cxxInterop] ) ,
37
- BenchmarkInfo (
38
- name: " CxxVectorOfU32.Sum.Swift.IndexAndSubscriptLoop " ,
34
+ name: " CxxVecU32.Sum.Swift.SubscriptLoop " ,
39
35
runFunction: run_CxxVectorOfU32_Sum_Swift_IndexAndSubscriptLoop,
40
36
tags: [ . validation, . bridging, . cxxInterop] ) ,
41
37
BenchmarkInfo (
42
- name: " CxxVectorOfU32 .Sum.Swift.Reduce" ,
38
+ name: " CxxVecU32 .Sum.Swift.Reduce" ,
43
39
runFunction: run_CxxVectorOfU32_Sum_Swift_Reduce,
44
40
tags: [ . validation, . bridging, . cxxInterop] )
45
41
]
@@ -69,23 +65,6 @@ public func run_CxxVectorOfU32_Sum_Swift_ForInLoop(_ n: Int) {
69
65
blackHole ( sum)
70
66
}
71
67
72
- // This function should have comparable performance to
73
- // `run_CxxVectorOfU32_Sum_Cxx_RangedForLoop`.
74
- @inline ( never)
75
- public func run_CxxVectorOfU32_Sum_Swift_RawIteratorLoop_WithCxxInlineHelpers( _ n: Int ) {
76
- let vectorOfU32 = makeVector32 ( vectorSize)
77
- var sum : UInt32 = 0
78
- for _ in 0 ..< ( n * iterRepeatFactor) {
79
- var b = vectorOfU32. __beginUnsafe ( )
80
- let e = vectorOfU32. __endUnsafe ( )
81
- while !cmp( b, e) {
82
- sum = sum &+ b. pointee
83
- b = next ( b)
84
- }
85
- }
86
- blackHole ( sum)
87
- }
88
-
89
68
// This function should have comparable performance to
90
69
// `run_CxxVectorOfU32_Sum_Cxx_RangedForLoop`.
91
70
@inline ( never)
@@ -108,11 +87,8 @@ public func run_CxxVectorOfU32_Sum_Swift_IndexAndSubscriptLoop(_ n: Int) {
108
87
let vectorOfU32 = makeVector32 ( vectorSize)
109
88
var sum : UInt32 = 0
110
89
for _ in 0 ..< ( n * iterRepeatFactor) {
111
- var i = 0
112
- let e = vectorOfU32. size ( )
113
- while i != e {
114
- sum = sum &+ vectorOfU32 [ i]
115
- i = i &+ 1
90
+ for i in 0 ..< vectorOfU32. size ( ) {
91
+ sum = sum &+ vectorOfU32 [ i]
116
92
}
117
93
}
118
94
blackHole ( sum)
@@ -128,14 +104,6 @@ public func run_CxxVectorOfU32_Sum_Swift_Reduce(_ n: Int) {
128
104
blackHole ( sum)
129
105
}
130
106
131
- public func != ( _ y: VectorOfU32 . const_iterator , _ x: VectorOfU32 . const_iterator ) -> Bool {
132
- return y. __baseUnsafe ( ) != x. __baseUnsafe ( )
133
- }
134
-
135
- public func == ( _ y: VectorOfU32 . const_iterator , _ x: VectorOfU32 . const_iterator ) -> Bool {
136
- return y. __baseUnsafe ( ) == x. __baseUnsafe ( )
137
- }
138
-
139
107
extension VectorOfU32 . const_iterator : Equatable , UnsafeCxxInputIterator { }
140
108
141
109
extension VectorOfU32 : CxxSequence { }
0 commit comments