Skip to content

Commit 18538b2

Browse files
committed
[benchmark] StackPromo Legacy Factor
1 parent 5e6fa19 commit 18538b2

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

benchmark/single-source/StackPromo.swift

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import TestsUtils
1414
public let StackPromo = BenchmarkInfo(
1515
name: "StackPromo",
1616
runFunction: run_StackPromo,
17-
tags: [.regression])
17+
tags: [.regression],
18+
legacyFactor: 100)
1819

1920
protocol Proto {
2021
func at() -> Int
@@ -43,19 +44,12 @@ class Foo : Proto {
4344
@inline(never)
4445
func work(_ f: Foo) -> Int {
4546
var r = 0
46-
for _ in 0..<100_000 {
47+
for _ in 0..<1_000 {
4748
r += testStackAllocation(f)
4849
}
4950
return r
5051
}
5152

52-
@inline(never)
53-
func hole(_ use: Int, _ N: Int) {
54-
if (N == 0) {
55-
print("use: \(use)")
56-
}
57-
}
58-
5953
public func run_StackPromo(_ N: Int) {
6054
let foo = Foo()
6155
var r = 0
@@ -66,5 +60,5 @@ public func run_StackPromo(_ N: Int) {
6660
r -= work(foo)
6761
}
6862
}
69-
hole(r, N)
63+
blackHole(r)
7064
}

0 commit comments

Comments
 (0)