Skip to content

Commit 44b4f0d

Browse files
committed
[benchmark] SortIntPyramids Legacy Factor
1 parent 25729f8 commit 44b4f0d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

benchmark/single-source/SortIntPyramids.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ public let SortIntPyramids = [
88
BenchmarkInfo(
99
name: "SortIntPyramid",
1010
runFunction: run_SortIntPyramid,
11-
tags: [.validation, .api, .algorithm]),
11+
tags: [.validation, .api, .algorithm],
12+
legacyFactor: 5),
1213
BenchmarkInfo(
1314
name: "SortAdjacentIntPyramids",
1415
runFunction: run_SortAdjacentIntPyramids,
15-
tags: [.validation, .api, .algorithm]),
16+
tags: [.validation, .api, .algorithm],
17+
legacyFactor: 5),
1618
]
1719

1820
// let A - array sorted in ascending order,
@@ -51,7 +53,7 @@ let adjacentPyramidsTemplate: [Int] = (1...aPH) + (1...aPH).reversed()
5153

5254
@inline(never)
5355
public func run_SortIntPyramid(_ N: Int) {
54-
for _ in 1...25*N {
56+
for _ in 1...5*N {
5557
var pyramid = pyramidTemplate
5658

5759
// sort pyramid in place.
@@ -64,7 +66,7 @@ public func run_SortIntPyramid(_ N: Int) {
6466

6567
@inline(never)
6668
public func run_SortAdjacentIntPyramids(_ N: Int) {
67-
for _ in 1...25*N {
69+
for _ in 1...5*N {
6870
var adjacentPyramids = adjacentPyramidsTemplate
6971
adjacentPyramids.sort()
7072
// Check whether pyramid is sorted.

0 commit comments

Comments
 (0)