Skip to content

Commit 71ed988

Browse files
committed
Scale benchmarks
1 parent 9b3bd5e commit 71ed988

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

benchmark/single-source/NaiveRangeReplaceableCollectionConformance.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ public let benchmarks = [
1818
BenchmarkInfo(name: "NaiveRRC.append.largeContiguous",
1919
runFunction: runAppendLargeContiguous,
2020
tags: [.validation, .api],
21-
setUpFunction: { contiguous = [UInt8](repeating: 7, count: 1_000_000) }),
21+
setUpFunction: { contiguous = [UInt8](repeating: 7, count: 10_000) }),
2222
BenchmarkInfo(name: "NaiveRRC.append.smallContiguousRepeatedly",
2323
runFunction: runAppendLargeContiguous,
2424
tags: [.validation, .api],
2525
setUpFunction: { contiguous = [UInt8](repeating: 7, count: 1) }),
2626
BenchmarkInfo(name: "NaiveRRC.init.largeContiguous",
2727
runFunction: runInitLargeContiguous,
2828
tags: [.validation, .api],
29-
setUpFunction: { contiguous = [UInt8](repeating: 7, count: 1_000_000) })
29+
setUpFunction: { contiguous = [UInt8](repeating: 7, count: 10_000) })
3030
]
3131

3232
struct NaiveRRC : RangeReplaceableCollection {
@@ -86,7 +86,7 @@ public func runAppendLargeContiguous(N: Int) {
8686
public func runAppendSmallContiguousRepeatedly(N: Int) {
8787
for _ in 1...N {
8888
var rrc = NaiveRRC()
89-
for _ in 1...1_000_000 {
89+
for _ in 1...10_000_000 {
9090
rrc.append(contentsOf: contiguous)
9191
}
9292
blackHole(rrc.count + Int(rrc[0]))

0 commit comments

Comments
 (0)