@@ -24,14 +24,6 @@ public let StringInterpolationManySmallSegments = BenchmarkInfo(
24
24
name: " StringInterpolationManySmallSegments " ,
25
25
runFunction: run_StringInterpolationManySmallSegments,
26
26
tags: [ . validation, . api, . String] )
27
- public let CustomStringInterpolation = BenchmarkInfo (
28
- name: " CustomStringInterpolation " ,
29
- runFunction: run_CustomStringInterpolation,
30
- tags: [ . validation, . api, . String] )
31
- public let CustomStringNoInterpolation = BenchmarkInfo (
32
- name: " CustomStringNoInterpolation " ,
33
- runFunction: run_CustomStringNoInterpolation,
34
- tags: [ . validation, . api, . String] )
35
27
36
28
class RefTypePrintable : CustomStringConvertible {
37
29
var description : String {
@@ -120,49 +112,3 @@ public func run_StringInterpolationManySmallSegments(_ N: Int) {
120
112
}
121
113
}
122
114
}
123
-
124
- @inline ( never)
125
- public func run_CustomStringInterpolation( _ N: Int ) {
126
- let reps = 100
127
- let refResult = reps
128
- let anInt : Int64 = 0x1234567812345678
129
- let aRefCountedObject = RefTypePrintable ( )
130
-
131
- for _ in 1 ... 100 * N {
132
- var result = 0
133
- for _ in 1 ... reps {
134
- let s : String = identity ( CustomString (
135
- " \( anInt) abcdefdhijklmn \( aRefCountedObject) abcdefdhijklmn \u{01} " ) ) . value
136
- let utf16 = s. utf16
137
-
138
- // FIXME: if String is not stored as UTF-16 on this platform, then the
139
- // following operation has a non-trivial cost and needs to be replaced
140
- // with an operation on the native storage type.
141
- result = result &+ Int ( utf16. last!)
142
- blackHole ( s)
143
- }
144
- CheckResults ( result == refResult)
145
- }
146
- }
147
-
148
- @inline ( never)
149
- public func run_CustomStringNoInterpolation( _ N: Int ) {
150
- let reps = 100
151
- let refResult = reps
152
-
153
- for _ in 1 ... 100 * N {
154
- var result = 0
155
- for _ in 1 ... reps {
156
- let s : String = identity ( CustomString (
157
- " abcdefdhijklmn abcdefdhijklmn \u{01} " ) ) . value
158
- let utf16 = s. utf16
159
-
160
- // FIXME: if String is not stored as UTF-16 on this platform, then the
161
- // following operation has a non-trivial cost and needs to be replaced
162
- // with an operation on the native storage type.
163
- result = result &+ Int ( utf16. last!)
164
- blackHole ( s)
165
- }
166
- CheckResults ( result == refResult)
167
- }
168
- }
0 commit comments