Skip to content

Commit 1dcdacf

Browse files
committed
[benchmark] TwoSum Legacy Factor
1 parent 18538b2 commit 1dcdacf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

benchmark/single-source/TwoSum.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ import TestsUtils
1717
public let TwoSum = BenchmarkInfo(
1818
name: "TwoSum",
1919
runFunction: run_TwoSum,
20-
tags: [.validation, .api, .Dictionary, .Array, .algorithm])
20+
tags: [.validation, .api, .Dictionary, .Array, .algorithm],
21+
legacyFactor: 2)
2122

2223
let array = [
2324
959, 81, 670, 727, 416, 171, 401, 398, 707, 596, 200, 9, 414, 98, 43,
@@ -61,7 +62,7 @@ public func run_TwoSum(_ N: Int) {
6162
var i1: Int?
6263
var i2: Int?
6364
var Dict: Dictionary<Int, Int> = [:]
64-
for _ in 1...2*N {
65+
for _ in 1...N {
6566
for Sum in 500..<600 {
6667
Dict = [:]
6768
i1 = nil

0 commit comments

Comments
 (0)