@@ -67,10 +67,11 @@ public func run_ArrayAppendReserved(_ N: Int) {
67
67
}
68
68
69
69
// Append a sequence. Length of sequence unknown so
70
- // can't pre-reserve capacity.
70
+ // can't pre-reserve capacity.
71
71
@inline ( never)
72
72
public func run_ArrayAppendSequence( _ N: Int ) {
73
73
let seq = stride ( from: 0 , to: 10_000 , by: 1 )
74
+
74
75
for _ in 0 ..< N {
75
76
for _ in 0 ..< 10 {
76
77
var nums = [ Int] ( )
@@ -139,7 +140,7 @@ public func run_ArrayAppendGenericStructs(_ N: Int) {
139
140
let other = Array ( repeating: S ( x: 3 , y: 4.2 ) , count: 10_000 )
140
141
for _ in 0 ..< N {
141
142
for _ in 0 ..< 10 {
142
- var nums = [ S < Int , Double > ] ( )
143
+ var nums = [ S < Int , Double > ] ( )
143
144
for _ in 0 ..< 8 {
144
145
nums += other
145
146
}
@@ -247,7 +248,7 @@ public func run_ArrayAppendToGeneric(_ N: Int) {
247
248
@inline ( never)
248
249
public func appendToFromGeneric<
249
250
R: RangeReplaceableCollection , S: Sequence
250
- > ( collection: inout R , sequence: S )
251
+ > ( collection: inout R , sequence: S )
251
252
where R. Element == S . Element {
252
253
collection. append ( contentsOf: sequence)
253
254
}
@@ -319,7 +320,7 @@ public func run_ArrayAppendAscii(_ N: Int) {
319
320
}
320
321
}
321
322
322
- // Append the utf8 elements of an ascii string to a [UInt8]
323
+ // Append the utf8 elements of a latin1 string to a [UInt8]
323
324
@inline ( never)
324
325
public func run_ArrayAppendLatin1( _ N: Int ) {
325
326
let s = " the quick brown fox jumps over the lazy dog \u{00A1} "
@@ -333,7 +334,7 @@ public func run_ArrayAppendLatin1(_ N: Int) {
333
334
}
334
335
}
335
336
336
- // Append the utf8 elements of an ascii string to a [UInt8]
337
+ // Append the utf8 elements of an utf16 string to a [UInt8]
337
338
@inline ( never)
338
339
public func run_ArrayAppendUTF16( _ N: Int ) {
339
340
let s = " the quick brown 🦊 jumps over the lazy dog "
@@ -347,7 +348,7 @@ public func run_ArrayAppendUTF16(_ N: Int) {
347
348
}
348
349
}
349
350
350
- // Append the utf8 elements of an ascii string to a [UInt8]
351
+ // Append the utf8 elements of an ascii substring to a [UInt8]
351
352
@inline ( never)
352
353
public func run_ArrayAppendAsciiSubstring( _ N: Int ) {
353
354
let s = " the quick brown fox jumps over the lazy dog! " [ ... ]
@@ -361,7 +362,7 @@ public func run_ArrayAppendAsciiSubstring(_ N: Int) {
361
362
}
362
363
}
363
364
364
- // Append the utf8 elements of an ascii string to a [UInt8]
365
+ // Append the utf8 elements of a latin1 substring to a [UInt8]
365
366
@inline ( never)
366
367
public func run_ArrayAppendLatin1Substring( _ N: Int ) {
367
368
let s = " the quick brown fox jumps over the lazy dog \u{00A1} " [ ... ]
@@ -375,7 +376,7 @@ public func run_ArrayAppendLatin1Substring(_ N: Int) {
375
376
}
376
377
}
377
378
378
- // Append the utf8 elements of an ascii string to a [UInt8]
379
+ // Append the utf8 elements of an utf16 substring to a [UInt8]
379
380
@inline ( never)
380
381
public func run_ArrayAppendUTF16Substring( _ N: Int ) {
381
382
let s = " the quick brown 🦊 jumps over the lazy dog " [ ... ]
@@ -388,4 +389,3 @@ public func run_ArrayAppendUTF16Substring(_ N: Int) {
388
389
}
389
390
}
390
391
}
391
-
0 commit comments