Skip to content

Commit 55b3b34

Browse files
committed
Decrease load 16x, fix naming, fix mem usage
Fixes mem usage of run_IndexPathSubscriptRangeMutation
1 parent fe5d276 commit 55b3b34

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

benchmark/single-source/IndexPathTest.swift

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,38 @@ let tags: [BenchmarkCategory] = [.validation, .api, .IndexPath]
1818

1919
public let IndexPathTest = [
2020
BenchmarkInfo(
21-
name: "IndexPathSubscriptMutation",
22-
runFunction: { n in run_IndexPathSubscriptMutation(n * 1000, size) },
21+
name: "IndexPath.Subscript.Mutation",
22+
runFunction: { n in run_IndexPathSubscriptMutation(n * 60, size) },
2323
tags: tags),
2424
BenchmarkInfo(
25-
name: "IndexPathSubscriptRangeMutation",
26-
runFunction: { n in run_IndexPathSubscriptRangeMutation(n * 1000, size) },
25+
name: "IndexPath.Subscript.Range.Mutation",
26+
runFunction: { n in run_IndexPathSubscriptRangeMutation(n * 60, size) },
2727
tags: tags),
2828

2929
BenchmarkInfo(
30-
name: "IndexPathMaxBeginning",
31-
runFunction: { n in run_IndexPathMaxBeginning(n * 1000) },
30+
name: "IndexPath.Max.Beginning",
31+
runFunction: { n in run_IndexPathMaxBeginning(n * 60) },
3232
tags: tags),
3333
BenchmarkInfo(
34-
name: "IndexPathMaxMiddle",
35-
runFunction: { n in run_IndexPathMaxMiddle(n * 1000) },
34+
name: "IndexPath.Max.Middle",
35+
runFunction: { n in run_IndexPathMaxMiddle(n * 60) },
3636
tags: tags),
3737
BenchmarkInfo(
38-
name: "IndexPathMaxEnd",
39-
runFunction: { n in run_IndexPathMaxEnd(n * 1000) },
38+
name: "IndexPath.Max.End",
39+
runFunction: { n in run_IndexPathMaxEnd(n * 60) },
4040
tags: tags),
4141

4242
BenchmarkInfo(
43-
name: "IndexPathMinBeginning",
44-
runFunction: { n in run_IndexPathMinBeginning(n * 1000) },
43+
name: "IndexPath.Min.Beginning",
44+
runFunction: { n in run_IndexPathMinBeginning(n * 60) },
4545
tags: tags),
4646
BenchmarkInfo(
47-
name: "IndexPathMinMiddle",
48-
runFunction: { n in run_IndexPathMinMiddle(n * 1000) },
47+
name: "IndexPath.Min.Middle",
48+
runFunction: { n in run_IndexPathMinMiddle(n * 60) },
4949
tags: tags),
5050
BenchmarkInfo(
51-
name: "IndexPathMinEnd",
52-
runFunction: { n in run_IndexPathMinEnd(n * 1000) },
51+
name: "IndexPath.Min.End",
52+
runFunction: { n in run_IndexPathMinEnd(n * 60) },
5353
tags: tags),
5454
]
5555

@@ -95,7 +95,7 @@ public func run_IndexPathSubscriptMutation(_ n: Int, _ count: Int) {
9595
@inline(never)
9696
public func run_IndexPathSubscriptRangeMutation(_ n: Int, _ count: Int) {
9797
subscriptMutation(
98-
n: count, mutations: count,
98+
n: n, mutations: count,
9999
mutate: { ip, i in
100100
ip[0..<i] += [i]
101101
})

0 commit comments

Comments
 (0)