Skip to content

Commit 9d033cd

Browse files
committed
[benchmark] Dictionary(OfObjects) Legacy Factor
1 parent 6caff6a commit 9d033cd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

benchmark/single-source/DictTest.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ import TestsUtils
1616
public let Dictionary = [
1717
BenchmarkInfo(name: "Dictionary", runFunction: run_Dictionary,
1818
tags: [.validation, .api, .Dictionary],
19-
setUpFunction: { blackHole(half) }),
19+
setUpFunction: { blackHole(half) },
20+
legacyFactor: 5),
2021
BenchmarkInfo(name: "DictionaryOfObjects",
2122
runFunction: run_DictionaryOfObjects,
2223
tags: [.validation, .api, .Dictionary],
23-
setUpFunction: { blackHole(halfObjects) }),
24+
setUpFunction: { blackHole(halfObjects) },
25+
legacyFactor: 5),
2426
]
2527

2628
let text = [
@@ -132,9 +134,8 @@ let half: Dictionary<String, Bool> = {
132134
}()
133135

134136
@inline(never)
135-
public func run_Dictionary(scale: Int) {
137+
public func run_Dictionary(N: Int) {
136138
var dict: Dictionary<String, Bool> = [:]
137-
let N = 5*scale
138139

139140
// Check performance of filling the dictionary:
140141
for _ in 1...N {
@@ -186,9 +187,8 @@ let halfObjects: Dictionary<Box<String>, Box<Bool>> = {
186187
}()
187188

188189
@inline(never)
189-
public func run_DictionaryOfObjects(scale: Int) {
190+
public func run_DictionaryOfObjects(N: Int) {
190191
var dict: Dictionary<Box<String>, Box<Bool>> = [:]
191-
let N = 5*scale
192192

193193
// Check performance of filling the dictionary:
194194
for _ in 1...N {

0 commit comments

Comments
 (0)