Skip to content

Commit 6eb85e4

Browse files
committed
[benchmark] DictionarySwapAtOfObjects fine-tune LF
1 parent 6bfaafa commit 6eb85e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benchmark/single-source/DictionarySwap.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public let DictionarySwap = [
2929
BenchmarkInfo(name: "DictionarySwapAt",
3030
runFunction: swapAt, tags: t, legacyFactor: 4),
3131
BenchmarkInfo(name: "DictionarySwapAtOfObjects",
32-
runFunction: swapAtObjects, tags: t, legacyFactor: 40),
32+
runFunction: swapAtObjects, tags: t, legacyFactor: 10),
3333
]
3434

3535
// Return true if correctly swapped, false otherwise
@@ -92,7 +92,7 @@ func swapAt(N: Int) {
9292
func swapAtObjects(N: Int) {
9393
var dict = boxedNumMap
9494
var swapped = false
95-
for _ in 1...250*N {
95+
for _ in 1...1000*N {
9696
let i25 = dict.index(forKey: Box(25))!
9797
let i75 = dict.index(forKey: Box(75))!
9898
dict.values.swapAt(i25, i75)

0 commit comments

Comments
 (0)