@@ -164,6 +164,9 @@ public let DataBenchmarks = [
164
164
BenchmarkInfo ( name: " DataToStringMedium " ,
165
165
runFunction: { string ( $0* 200 , from: mediumData) } , tags: d,
166
166
legacyFactor: 50 ) ,
167
+ BenchmarkInfo ( name: " DataToStringLargeUnicode " ,
168
+ runFunction: { string ( $0* 200 , from: largeUnicodeData) } , tags: d,
169
+ legacyFactor: 50 ) ,
167
170
168
171
BenchmarkInfo ( name: " StringToDataEmpty " ,
169
172
runFunction: { data ( $0* 200 , from: emptyString) } , tags: d,
@@ -174,6 +177,9 @@ public let DataBenchmarks = [
174
177
BenchmarkInfo ( name: " StringToDataMedium " ,
175
178
runFunction: { data ( $0* 200 , from: mediumString) } , tags: d,
176
179
legacyFactor: 50 ) ,
180
+ BenchmarkInfo ( name: " StringToDataLargeUnicode " ,
181
+ runFunction: { data ( $0* 200 , from: largeUnicodeString) } , tags: d,
182
+ legacyFactor: 50 ) ,
177
183
178
184
BenchmarkInfo ( name: " Data.hash.Empty " ,
179
185
runFunction: { hash ( $0* 10_000 , data: Data ( ) ) } , tags: d) ,
@@ -186,9 +192,12 @@ public let DataBenchmarks = [
186
192
let emptyString = " "
187
193
let smallString = " \r \n "
188
194
let mediumString = " \r \n \r \n \r \n \r \n \r \n \r \n \r \n \r \n \r \n "
195
+ let largeUnicodeString =
196
+ " Swiftに大幅な改良が施され、𓀀𓀁𓀂𓀃, 🇺🇸🇨🇦🇲🇽 " + mediumString
189
197
let emptyData = Data ( )
190
198
let smallData = Data ( smallString. utf8)
191
199
let mediumData = Data ( mediumString. utf8)
200
+ let largeUnicodeData = Data ( largeUnicodeString. utf8)
192
201
193
202
let small = sampleData ( . small)
194
203
let medium = sampleData ( . medium)
0 commit comments