Skip to content

Commit 796cb44

Browse files
committed
[benchmark] ArraySetElement - revert legacy factor
This benchmark had good enough runtime with the original 10x loop multiplier. Lowering it further exposed the setup overhead of creating the 10k element array. Reverting back.
1 parent 9ef04bb commit 796cb44

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

benchmark/single-source/ArraySetElement.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import TestsUtils
1818
public var ArraySetElement = BenchmarkInfo(
1919
name: "ArraySetElement",
2020
runFunction: run_ArraySetElement,
21-
tags: [.runtime, .cpubench, .unstable],
22-
legacyFactor: 10
21+
tags: [.runtime, .cpubench]
2322
)
2423

2524
// This is an effort to defeat isUniquelyReferenced optimization. Ideally
@@ -31,7 +30,7 @@ func storeArrayElement(_ array: inout [Int], _ i: Int) {
3130

3231
public func run_ArraySetElement(_ N: Int) {
3332
var array = [Int](repeating: 0, count: 10000)
34-
for _ in 0..<N {
33+
for _ in 0..<10*N {
3534
for i in 0..<array.count {
3635
storeArrayElement(&array, i)
3736
}

0 commit comments

Comments
 (0)