Skip to content

Commit 85c8bff

Browse files
committed
[benchmark] DictionaryRemove Legacy Factor
1 parent 8d0544d commit 85c8bff

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

benchmark/single-source/DictionaryRemove.swift

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@
1414
// rdar://problem/19804127
1515
import TestsUtils
1616

17+
let t: [BenchmarkCategory] = [.validation, .api, .Dictionary]
18+
1719
public let DictionaryRemove = [
18-
BenchmarkInfo(name: "DictionaryRemove", runFunction: run_DictionaryRemove, tags: [.validation, .api, .Dictionary]),
19-
BenchmarkInfo(name: "DictionaryRemoveOfObjects", runFunction: run_DictionaryRemoveOfObjects, tags: [.validation, .api, .Dictionary]),
20+
BenchmarkInfo(name: "DictionaryRemove",
21+
runFunction: run_DictionaryRemove, tags: t, legacyFactor: 10),
22+
BenchmarkInfo(name: "DictionaryRemoveOfObjects",
23+
runFunction: run_DictionaryRemoveOfObjects, tags: t, legacyFactor: 100),
2024
]
2125

2226
@inline(never)
@@ -31,7 +35,7 @@ public func run_DictionaryRemove(_ N: Int) {
3135
CheckResults(dict.count == size)
3236

3337
var tmpDict = dict
34-
for _ in 1...1000*N {
38+
for _ in 1...100*N {
3539
tmpDict = dict
3640
// Empty dictionary
3741
for i in 1...size {
@@ -73,7 +77,7 @@ public func run_DictionaryRemoveOfObjects(_ N: Int) {
7377
CheckResults(dict.count == size)
7478

7579
var tmpDict = dict
76-
for _ in 1...1000*N {
80+
for _ in 1...10*N {
7781
tmpDict = dict
7882
// Empty dictionary
7983
for i in 1...size {

0 commit comments

Comments
 (0)