Skip to content

Commit 4bbb635

Browse files
committed
[benchmark] Gardening: Fix copy/paste comments
1 parent c71d863 commit 4bbb635

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

benchmark/single-source/ArrayAppend.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ public func run_ArrayAppendReserved(_ N: Int) {
6767
}
6868

6969
// Append a sequence. Length of sequence unknown so
70-
// can't pre-reserve capacity.
70+
// can't pre-reserve capacity.
7171
@inline(never)
7272
public func run_ArrayAppendSequence(_ N: Int) {
7373
let seq = stride(from: 0, to: 10_000, by: 1)
74+
7475
for _ in 0..<N {
7576
for _ in 0..<10 {
7677
var nums = [Int]()
@@ -139,7 +140,7 @@ public func run_ArrayAppendGenericStructs(_ N: Int) {
139140
let other = Array(repeating: S(x: 3, y: 4.2), count: 10_000)
140141
for _ in 0..<N {
141142
for _ in 0..<10 {
142-
var nums = [S<Int,Double>]()
143+
var nums = [S<Int, Double>]()
143144
for _ in 0..<8 {
144145
nums += other
145146
}
@@ -247,7 +248,7 @@ public func run_ArrayAppendToGeneric(_ N: Int) {
247248
@inline(never)
248249
public func appendToFromGeneric<
249250
R: RangeReplaceableCollection, S: Sequence
250-
>(collection: inout R, sequence: S)
251+
>(collection: inout R, sequence: S)
251252
where R.Element == S.Element {
252253
collection.append(contentsOf: sequence)
253254
}
@@ -319,7 +320,7 @@ public func run_ArrayAppendAscii(_ N: Int) {
319320
}
320321
}
321322

322-
// Append the utf8 elements of an ascii string to a [UInt8]
323+
// Append the utf8 elements of a latin1 string to a [UInt8]
323324
@inline(never)
324325
public func run_ArrayAppendLatin1(_ N: Int) {
325326
let s = "the quick brown fox jumps over the lazy dog\u{00A1}"
@@ -333,7 +334,7 @@ public func run_ArrayAppendLatin1(_ N: Int) {
333334
}
334335
}
335336

336-
// Append the utf8 elements of an ascii string to a [UInt8]
337+
// Append the utf8 elements of an utf16 string to a [UInt8]
337338
@inline(never)
338339
public func run_ArrayAppendUTF16(_ N: Int) {
339340
let s = "the quick brown 🦊 jumps over the lazy dog"
@@ -347,7 +348,7 @@ public func run_ArrayAppendUTF16(_ N: Int) {
347348
}
348349
}
349350

350-
// Append the utf8 elements of an ascii string to a [UInt8]
351+
// Append the utf8 elements of an ascii substring to a [UInt8]
351352
@inline(never)
352353
public func run_ArrayAppendAsciiSubstring(_ N: Int) {
353354
let s = "the quick brown fox jumps over the lazy dog!"[...]
@@ -361,7 +362,7 @@ public func run_ArrayAppendAsciiSubstring(_ N: Int) {
361362
}
362363
}
363364

364-
// Append the utf8 elements of an ascii string to a [UInt8]
365+
// Append the utf8 elements of a latin1 substring to a [UInt8]
365366
@inline(never)
366367
public func run_ArrayAppendLatin1Substring(_ N: Int) {
367368
let s = "the quick brown fox jumps over the lazy dog\u{00A1}"[...]
@@ -375,7 +376,7 @@ public func run_ArrayAppendLatin1Substring(_ N: Int) {
375376
}
376377
}
377378

378-
// Append the utf8 elements of an ascii string to a [UInt8]
379+
// Append the utf8 elements of an utf16 substring to a [UInt8]
379380
@inline(never)
380381
public func run_ArrayAppendUTF16Substring(_ N: Int) {
381382
let s = "the quick brown 🦊 jumps over the lazy dog"[...]
@@ -388,4 +389,3 @@ public func run_ArrayAppendUTF16Substring(_ N: Int) {
388389
}
389390
}
390391
}
391-

0 commit comments

Comments
 (0)