@@ -78,19 +78,6 @@ public let DataBenchmarks = [
78
78
_init ( $0, sequence: Bytes ( count: 2 <<15 , exact: true ) ) } , tags: d) ,
79
79
BenchmarkInfo ( name: " Data.init.Sequence.64kB.Count0 " , runFunction: {
80
80
_init ( $0, sequence: Bytes ( count: 2 <<15 , exact: false ) ) } , tags: d) ,
81
- BenchmarkInfo ( name: " Array.init.Sequence.64kB.Count.I " , runFunction: {
82
- for _ in 1 ... $0 {
83
- blackHole ( Array ( Bytes ( count: 2 <<15 , exact: true ) ) ) } } , tags: d) ,
84
- BenchmarkInfo ( name: " Array.init.Sequence.64kB.Count0.I " , runFunction: {
85
- for _ in 1 ... $0 {
86
- blackHole ( Array ( Bytes ( count: 2 <<15 , exact: false ) ) ) } } , tags: d) ,
87
- BenchmarkInfo ( name: " Array.init.Sequence.64kB.Count.RE.I " , runFunction: {
88
- for _ in 1 ... $0 {
89
- blackHole ( Array ( repeatElement ( UInt8 ( 0xA0 ) , count: 2 <<15 ) ) ) } } , tags: d) ,
90
- BenchmarkInfo ( name: " Array.init.Sequence.64kB.Count0.RE.I " , runFunction: {
91
- for _ in 1 ... $0 {
92
- blackHole ( Array ( Count0 ( repeatElement ( UInt8 ( 0xA0 ) , count: 2 <<15 ) ) ) ) } } ,
93
- tags: d) ,
94
81
BenchmarkInfo ( name: " Data.init.Sequence.64kB.Count.I " , runFunction: {
95
82
for _ in 0 ..< $0 {
96
83
blackHole ( Data ( Bytes ( count: 2 <<15 , exact: true ) ) ) } } , tags: d) ,
@@ -215,20 +202,6 @@ public let DataBenchmarks = [
215
202
BenchmarkInfo ( name: " Data.append.Sequence.64kB.Count0 " , runFunction: {
216
203
append ( $0, sequence: Bytes ( count: 2 <<15 , exact: false ) , to: medium) } ,
217
204
tags: d) ,
218
- BenchmarkInfo ( name: " Array.append.Sequence.64kB.Count.I " , runFunction: {
219
- for _ in 1 ... $0 { var copy = mediumArray
220
- copy. append ( contentsOf: Bytes ( count: 2 <<15 , exact: true ) ) } } , tags: d) ,
221
- BenchmarkInfo ( name: " Array.append.Sequence.64kB.Count0.I " , runFunction: {
222
- for _ in 1 ... $0 { var copy = mediumArray
223
- copy. append ( contentsOf: Bytes ( count: 2 <<15 , exact: false ) ) } } , tags: d) ,
224
- BenchmarkInfo ( name: " Array.append.Sequence.64kB.Count.RE.I " , runFunction: {
225
- for _ in 1 ... $0 { var copy = mediumArray
226
- copy. append ( contentsOf: repeatElement ( UInt8 ( 0xA0 ) , count: 2 <<15 ) ) } } ,
227
- tags: d) ,
228
- BenchmarkInfo ( name: " Array.append.Sequence.64kB.Count0.RE.I " , runFunction: {
229
- for _ in 1 ... $0 { var copy = mediumArray
230
- copy. append ( contentsOf: Count0 ( repeatElement ( UInt8 ( 0xA0 ) , count: 2 <<15 ) ) )
231
- } } , tags: d) ,
232
205
BenchmarkInfo ( name: " Data.append.Sequence.64kB.Count.I " , runFunction: {
233
206
for _ in 1 ... $0 { var copy = medium
234
207
copy. append ( contentsOf: Bytes ( count: 2 <<15 , exact: true ) ) } } , tags: d) ,
@@ -331,14 +304,6 @@ let small = sampleData(.small)
331
304
let medium = sampleData ( . medium)
332
305
let large = sampleData ( . large)
333
306
334
- let mediumArray : [ UInt8 ] = ( 1 ... 1033 ) . map { UInt8 ( truncatingIfNeeded: $0) }
335
-
336
- let repeatElementSeq = { count in
337
- return sequence ( state: count) { ( i: inout Int ) -> UInt8 ? in
338
- defer { i = i &- 1 } ; return i > 0 ? UInt8 ( 0xA0 ) : nil
339
- }
340
- }
341
-
342
307
struct Count0 < S: Sequence > : Sequence {
343
308
let base : S
344
309
init ( _ base: S ) { self . base = base }
0 commit comments