Skip to content

Commit b4d8172

Browse files
committed
[benchmark] Adjust loop multipliers Set.*
Increase the multipliers to get reliably measurable runtimes.
1 parent c011bd7 commit b4d8172

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

benchmark/single-source/SetTests.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,22 +100,22 @@ public let SetTests = [
100100

101101
BenchmarkInfo(
102102
name: "Set.isDisjoint.Empty.Int0",
103-
runFunction: { n in run_SetIsDisjointInt(setE, setAB, true, 50 * n) },
103+
runFunction: { n in run_SetIsDisjointInt(setE, setAB, true, 5000 * n) },
104104
tags: [.validation, .api, .Set],
105105
setUpFunction: { blackHole([setE, setAB]) }),
106106
BenchmarkInfo(
107107
name: "Set.isDisjoint.Int0.Empty",
108-
runFunction: { n in run_SetIsDisjointInt(setAB, setE, true, 50 * n) },
108+
runFunction: { n in run_SetIsDisjointInt(setAB, setE, true, 5000 * n) },
109109
tags: [.validation, .api, .Set],
110110
setUpFunction: { blackHole([setAB, setE]) }),
111111
BenchmarkInfo(
112112
name: "Set.isDisjoint.Empty.Box0",
113-
runFunction: { n in run_SetIsDisjointBox(setOE, setOAB, true, 50 * n) },
113+
runFunction: { n in run_SetIsDisjointBox(setOE, setOAB, true, 5000 * n) },
114114
tags: [.validation, .api, .Set],
115115
setUpFunction: { blackHole([setOE, setOAB]) }),
116116
BenchmarkInfo(
117117
name: "Set.isDisjoint.Box0.Empty",
118-
runFunction: { n in run_SetIsDisjointBox(setOAB, setOE, true, 50 * n) },
118+
runFunction: { n in run_SetIsDisjointBox(setOAB, setOE, true, 5000 * n) },
119119
tags: [.validation, .api, .Set],
120120
setUpFunction: { blackHole([setOAB, setOE]) }),
121121
BenchmarkInfo(
@@ -130,22 +130,22 @@ public let SetTests = [
130130
setUpFunction: { blackHole([setOAB, setOCD]) }),
131131
BenchmarkInfo(
132132
name: "Set.isDisjoint.Int25",
133-
runFunction: { n in run_SetIsDisjointInt(setB, setAB, false, 50 * n) },
133+
runFunction: { n in run_SetIsDisjointInt(setB, setAB, false, 5000 * n) },
134134
tags: [.validation, .api, .Set],
135135
setUpFunction: { blackHole([setB, setAB]) }),
136136
BenchmarkInfo(
137137
name: "Set.isDisjoint.Box25",
138-
runFunction: { n in run_SetIsDisjointBox(setOB, setOAB, false, 50 * n) },
138+
runFunction: { n in run_SetIsDisjointBox(setOB, setOAB, false, 5000 * n) },
139139
tags: [.validation, .api, .Set],
140140
setUpFunction: { blackHole([setOB, setOAB]) }),
141141
BenchmarkInfo(
142142
name: "Set.isDisjoint.Int50",
143-
runFunction: { n in run_SetIsDisjointInt(setY, setXY, false, 50 * n) },
143+
runFunction: { n in run_SetIsDisjointInt(setY, setXY, false, 5000 * n) },
144144
tags: [.validation, .api, .Set],
145145
setUpFunction: { blackHole([setY, setXY]) }),
146146
BenchmarkInfo(
147147
name: "Set.isDisjoint.Int100",
148-
runFunction: { n in run_SetIsDisjointInt(setP, setQ, false, 50 * n) },
148+
runFunction: { n in run_SetIsDisjointInt(setP, setQ, false, 5000 * n) },
149149
tags: [.validation, .api, .Set],
150150
setUpFunction: { blackHole([setP, setQ]) }),
151151

@@ -244,22 +244,22 @@ public let SetTests = [
244244

245245
BenchmarkInfo(
246246
name: "Set.subtracting.Empty.Int0",
247-
runFunction: { n in run_SetSubtractingInt(setE, setAB, 0, 10 * n) },
247+
runFunction: { n in run_SetSubtractingInt(setE, setAB, 0, 1000 * n) },
248248
tags: [.validation, .api, .Set],
249249
setUpFunction: { blackHole([setE, setAB]) }),
250250
BenchmarkInfo(
251251
name: "Set.subtracting.Int0.Empty",
252-
runFunction: { n in run_SetSubtractingInt(setAB, setE, countAB, 10 * n) },
252+
runFunction: { n in run_SetSubtractingInt(setAB, setE, countAB, 1000 * n) },
253253
tags: [.validation, .api, .Set],
254254
setUpFunction: { blackHole([setAB, setE]) }),
255255
BenchmarkInfo(
256256
name: "Set.subtracting.Empty.Box0",
257-
runFunction: { n in run_SetSubtractingBox(setOE, setOAB, 0, 10 * n) },
257+
runFunction: { n in run_SetSubtractingBox(setOE, setOAB, 0, 1000 * n) },
258258
tags: [.validation, .api, .Set],
259259
setUpFunction: { blackHole([setOE, setOAB]) }),
260260
BenchmarkInfo(
261261
name: "Set.subtracting.Box0.Empty",
262-
runFunction: { n in run_SetSubtractingBox(setOAB, setOE, countAB, 10 * n) },
262+
runFunction: { n in run_SetSubtractingBox(setOAB, setOE, countAB, 1000 * n) },
263263
tags: [.validation, .api, .Set],
264264
setUpFunction: { blackHole([setOAB, setOE]) }),
265265
BenchmarkInfo(

0 commit comments

Comments
 (0)