@@ -164,6 +164,9 @@ public let DataBenchmarks = [
164164 BenchmarkInfo ( name: " DataToStringMedium " ,
165165 runFunction: { string ( $0* 200 , from: mediumData) } , tags: d,
166166 legacyFactor: 50 ) ,
167+ BenchmarkInfo ( name: " DataToStringLargeUnicode " ,
168+ runFunction: { string ( $0* 200 , from: largeUnicodeData) } , tags: d,
169+ legacyFactor: 50 ) ,
167170
168171 BenchmarkInfo ( name: " StringToDataEmpty " ,
169172 runFunction: { data ( $0* 200 , from: emptyString) } , tags: d,
@@ -174,6 +177,9 @@ public let DataBenchmarks = [
174177 BenchmarkInfo ( name: " StringToDataMedium " ,
175178 runFunction: { data ( $0* 200 , from: mediumString) } , tags: d,
176179 legacyFactor: 50 ) ,
180+ BenchmarkInfo ( name: " StringToDataLargeUnicode " ,
181+ runFunction: { data ( $0* 200 , from: largeUnicodeString) } , tags: d,
182+ legacyFactor: 50 ) ,
177183
178184 BenchmarkInfo ( name: " Data.hash.Empty " ,
179185 runFunction: { hash ( $0* 10_000 , data: Data ( ) ) } , tags: d) ,
@@ -186,9 +192,12 @@ public let DataBenchmarks = [
186192let emptyString = " "
187193let smallString = " \r \n "
188194let 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
189197let emptyData = Data ( )
190198let smallData = Data ( smallString. utf8)
191199let mediumData = Data ( mediumString. utf8)
200+ let largeUnicodeData = Data ( largeUnicodeString. utf8)
192201
193202let small = sampleData ( . small)
194203let medium = sampleData ( . medium)
0 commit comments