Skip to content

Commit 04d1384

Browse files
committed
[benchmark] Legacy factor AnyHashableWithAClass
Lowered the base workload by a factor of 500
1 parent a7f832f commit 04d1384

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

benchmark/single-source/AnyHashableWithAClass.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ import TestsUtils
2525
public var AnyHashableWithAClass = BenchmarkInfo(
2626
name: "AnyHashableWithAClass",
2727
runFunction: run_AnyHashableWithAClass,
28-
tags: [.abstraction, .runtime, .cpubench]
28+
tags: [.abstraction, .runtime, .cpubench],
29+
legacyFactor: lf
2930
)
3031

32+
let lf = 500
33+
3134
class TestHashableBase : Hashable {
3235
var value: Int
3336
init(_ value: Int) {
@@ -55,8 +58,7 @@ class TestHashableDerived5 : TestHashableDerived4 {}
5558
@inline(never)
5659
public func run_AnyHashableWithAClass(_ N: Int) {
5760
let c = TestHashableDerived5(10)
58-
for _ in 0...(N*500000) {
61+
for _ in 0...(N*500000/lf) {
5962
_ = AnyHashable(c)
6063
}
6164
}
62-

0 commit comments

Comments
 (0)